diff options
Diffstat (limited to 'math/gen-libm-test.pl')
-rwxr-xr-x | math/gen-libm-test.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl index a63f62a1cb..0b0b8ca19f 100755 --- a/math/gen-libm-test.pl +++ b/math/gen-libm-test.pl @@ -558,9 +558,11 @@ sub parse_ulps { sub clean_up_number { my ($number) = @_; - # Remove trailing zeros - $number =~ s/0+$//; - $number =~ s/\.$//; + # Remove trailing zeros after the decimal point + if ($number =~ /\./) { + $number =~ s/0+$//; + $number =~ s/\.$//; + } return $number; } |