This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
gen-libm-test.pl fix for 10ulp errors
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 8 Jun 2006 19:46:48 +0000 (UTC)
- Subject: gen-libm-test.pl fix for 10ulp errors
I was generating an ULPs file where some functions had 10ulp errors and
noticed that gen-libm-test.pl truncated this to 1ulp. This patch fixes
this problem.
2006-06-08 Joseph Myers <joseph@codesourcery.com>
* math/gen-libm-test.pl (clean_up_number): Do not remove trailing
0s from integers.
Index: math/gen-libm-test.pl
===================================================================
RCS file: /cvs/glibc/libc/math/gen-libm-test.pl,v
retrieving revision 1.9
diff -u -r1.9 gen-libm-test.pl
--- math/gen-libm-test.pl 16 Mar 2006 23:16:50 -0000 1.9
+++ math/gen-libm-test.pl 8 Jun 2006 19:44:24 -0000
@@ -559,8 +559,10 @@
my ($number) = @_;
# Remove trailing zeros
- $number =~ s/0+$//;
- $number =~ s/\.$//;
+ if ($number =~ /\./) {
+ $number =~ s/0+$//;
+ $number =~ s/\.$//;
+ }
return $number;
}
--
Joseph S. Myers
joseph@codesourcery.com