1 21 Oct 2002 2 bug fix in e_pow.c from "David G Hough at validlab.com" <validlab (a] validlab.com>. 3 credit for bug report goes to andrew_johnson (a] uk.ibm.com 4 test example: 5 ----------------------------- 6 static int fail=0; 7 8 trypow(x,y,z) 9 double x,y,z; 10 { 11 extern double ieee_pow(); 12 double p ; 13 14 p = ieee_pow(x,y); 15 if (p != z) { 16 printf(" pow failure x %e y %e computed %e correct %e \n",x,y,p,z); 17 fail++; 18 return; 19 } 20 if (1/p != 1/z) { 21 printf(" pow failure x %e y %e computed %e correct %e \n",x,y,p,z); 22 fail++; 23 return; 24 } 25 } 26 27 main() 28 { 29 30 trypow( 1.0000000001, 1.0000000001E10, 2.7182820535066154); 31 trypow(-1.0000000001, 1.0000000001E10, -2.7182820535066154); 32 trypow(-0.001, 1.0000000001E10, -0.0); 33 trypow(-1000.0, 1.0000000001E10, -1.0/0.0); 34 35 if (fail == 0) { 36 printf(" fdlibm e_pow.c seems to be current \n"); 37 exit(0); 38 } 39 else { 40 printf(" fdlibm e_pow.c seems to be out of date \n"); 41 exit(1); 42 } 43 44 } 45 ----------------------------- 46 47 48 49 What's new in FDLIBM 5.3? 50 51 CONFIGURE 52 To build FDLIBM, edit the supplied Makefile or create 53 a local Makefile by running "sh configure" 54 using the supplied configure script contributed by Nelson Beebe 55 56 BUGS FIXED 57 58 1. e_pow.c incorrect results when 59 x is very close to -1.0 and y is very large, e.g. 60 ieee_pow(-1.0000000000000002e+00,4.5035996273704970e+15) = 0 61 ieee_pow(-9.9999999999999978e-01,4.5035996273704970e+15) = 0 62 Correct results are close to -e and -1/e. 63 64 2. k_tan.c error was > 1 ulp target for FDLIBM 65 5.2: Worst error at least 1.45 ulp at 66 ieee_tan(1.7765241907548024E+269) = 1.7733884462610958E+16 67 5.3: Worst error 0.96 ulp 68 69 NOT FIXED YET 70 71 3. Compiler failure on non-standard code 72 Statements like 73 *(1+(int*)&t1) = 0; 74 are not standard C and cause some optimizing compilers (e.g. GCC) 75 to generate bad code under optimization. These cases 76 are to be addressed in the next release. 77 78