gen-libm-test.pl fix for 10ulp errors

Joseph S. Myers joseph@codesourcery.com
Thu Jun 8 19:46:00 GMT 2006


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



More information about the Libc-alpha mailing list