Skip to content

Commit 857f314

Browse files
authored
Revert "Make promote() use MathObject Real when converting a decimal. #429"
1 parent 651565f commit 857f314

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)