| 21 Oct 2002 |
| bug fix in e_pow.c from "David G Hough at validlab.com" <validlab@validlab.com>. |
| credit for bug report goes to andrew_johnson@uk.ibm.com |
| test example: |
| ----------------------------- |
| static int fail=0; |
| |
| trypow(x,y,z) |
| double x,y,z; |
| { |
| extern double ieee_pow(); |
| double p ; |
| |
| p = ieee_pow(x,y); |
| if (p != z) { |
| printf(" pow failure x %e y %e computed %e correct %e \n",x,y,p,z); |
| fail++; |
| return; |
| } |
| if (1/p != 1/z) { |
| printf(" pow failure x %e y %e computed %e correct %e \n",x,y,p,z); |
| fail++; |
| return; |
| } |
| } |
| |
| main() |
| { |
| |
| trypow( 1.0000000001, 1.0000000001E10, 2.7182820535066154); |
| trypow(-1.0000000001, 1.0000000001E10, -2.7182820535066154); |
| trypow(-0.001, 1.0000000001E10, -0.0); |
| trypow(-1000.0, 1.0000000001E10, -1.0/0.0); |
| |
| if (fail == 0) { |
| printf(" fdlibm e_pow.c seems to be current \n"); |
| exit(0); |
| } |
| else { |
| printf(" fdlibm e_pow.c seems to be out of date \n"); |
| exit(1); |
| } |
| |
| } |
| ----------------------------- |
| |
| |
| |
| What's new in FDLIBM 5.3? |
| |
| CONFIGURE |
| To build FDLIBM, edit the supplied Makefile or create |
| a local Makefile by running "sh configure" |
| using the supplied configure script contributed by Nelson Beebe |
| |
| BUGS FIXED |
| |
| 1. e_pow.c incorrect results when |
| x is very close to -1.0 and y is very large, e.g. |
| ieee_pow(-1.0000000000000002e+00,4.5035996273704970e+15) = 0 |
| ieee_pow(-9.9999999999999978e-01,4.5035996273704970e+15) = 0 |
| Correct results are close to -e and -1/e. |
| |
| 2. k_tan.c error was > 1 ulp target for FDLIBM |
| 5.2: Worst error at least 1.45 ulp at |
| ieee_tan(1.7765241907548024E+269) = 1.7733884462610958E+16 |
| 5.3: Worst error 0.96 ulp |
| |
| NOT FIXED YET |
| |
| 3. Compiler failure on non-standard code |
| Statements like |
| *(1+(int*)&t1) = 0; |
| are not standard C and cause some optimizing compilers (e.g. GCC) |
| to generate bad code under optimization. These cases |
| are to be addressed in the next release. |
| |