Skip to content

Commit

Permalink
Fix isNumber to handle mixed fractions
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Dec 2, 2024
1 parent ffd92b9 commit c33616d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Value.pm
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ sub isValue {
sub isNumber {
my $n = shift;
return $n->{tree}->isNumber if isFormula($n);
return classMatch($n, 'Real', 'Complex') || matchNumber($n);
return (isValue($n) && ($n->type eq 'Number' || classMatch($n, 'Real', 'Complex'))) || matchNumber($n);
}

sub isRealNumber {
Expand Down

0 comments on commit c33616d

Please sign in to comment.