Skip to content

Commit 25901f8

Browse files
authored
Merge pull request #433 from openwebwork/revert-430-issue429
Revert "Make promote() use MathObject Real when converting a decimal. #429"
2 parents 651565f + 857f314 commit 25901f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

macros/contextFraction.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,8 @@ sub promote {
698698
my $x = (scalar(@_) ? shift : $self);
699699
if (scalar(@_) == 0) {
700700
return $x->inContext($context) if ref($x) eq $class;
701-
return (bless {data => [$x->value,1], context => $context}, $class) if Value::isReal($x) && isInteger($x);
702-
return (bless {data => [$x,1], context => $context}, $class) if Value::isReal($x) || Value::matchNumber($x);
701+
return (bless {data => [$x->value,1], context => $context}, $class) if Value::isReal($x);
702+
return (bless {data => [$x,1], context => $context}, $class) if Value::matchNumber($x);
703703
}
704704
return $x if Value::isValue($x) && $x->classMatch("Infinity");
705705
return $self->new($context,$x,@_);

0 commit comments

Comments
 (0)