ANS FORTH CELEFUNT TEST RESULTS FOR |Z| zabs.fs vs. 0.9.3 dnw 19Jan05 These results were obtained with pfe 0.33.58 compiled with gcc 3.3.3 on my MacOS X 10.3.7, PowerMac dual G4 system. Leaving aside the pfe C-primitive tests, Gforth 0.6.2 gives the same results as pfe on the same system, except for the way NaN and Inf are treated. Results from Cody's original Fortran code are included for reference. It was compiled with GNU Fortran (GCC) 3.4 20031015 (experimental) under MacOS X. The "fsl" version calls zabs.seq, extracted from Everett Carter's Forth Scientific Library code for ZABS, vs. 1.4. The "normal" version calls complex.fs vs. 0.8.2, Julian Noble's original code for |Z|. The "kahan" version calls complex-kahan.fs vs. 0.8.7, which uses the Kahan algorithm without treatment of IEEE 754 underflow/overflow exceptions. The "pfe prim" version calls the pfe complex module vs. 0.8.7, which codes the Kahan algorithm in C with treatment of underflow/overflow exceptions. This module is part of the pfe 0.33.xx series distribution. N= = number out of 2000 random trials that are equal MRE = maxium relative error RMS = rms relative err ULP = estimated units in last place (loss of base 2 significant digits) Floating point numbers have 53 significant bits, with at most 7 significant decimal digits printed out below. |3*x+4i*x| vs. 5x, 1 <= x <= 20 N= MRE ULP RMS ULP g77 2000 0.00e0 0.00 0.00e0 0.00 fsl 2000 0.00e0 0.00 0.00e0 0.00 normal 2000 0.00e0 0.00 0.00e0 0.00 kahan 2000 0.00e0 0.00 0.00e0 0.00 pfe prim 2000 0.00e0 0.00 0.00e0 0.00 |5*x+12i*x| vs. 13x, 1 <= x <= 20 N= MRE ULP RMS ULP g77 1246 1.37e-16 0.30 7.56e-17 0.00 fsl 2000 0.00e0 0.00 0.00e0 0.00 normal 1012 2.22e-16 1.00 9.81e-17 0.00 kahan 2000 0.00e0 0.00 0.00e0 0.00 pfe prim 2000 0.00e0 0.00 0.00e0 0.00 |3*xmin + 4i*xmin| 5*xmin difference g77 1.112537e-307 1.112537e-307 0.000000e+00 fsl 1.112537e-307 1.112537e-307 0.000000e+00 normal 1.112537e-307 1.112537e-307 0.000000e+00 kahan 1.112537e-307 1.112537e-307 0.000000e+00 pfe prim 1.112537e-307 1.112537e-307 0.000000e+00 |3*xmax/5 + 4i*xmax/5| xmax difference g77 na na na fsl NAN 1.797693e+308 NAN normal 1.797693e+308 1.797693e+308 0.000000e+00 kahan 1.797693e+308 1.797693e+308 0.000000e+00 pfe prim 1.797693e+308 1.797693e+308 0.000000e+00 |5*xmax/16 + 12i*xmax/16| 13*xmax/16 difference g77 1.460626e+308 na na fsl NAN 1.460626e+308 NAN normal 1.460626e+308 1.460626e+308 -1.995840e+292 kahan 1.460626e+308 1.460626e+308 0.000000e+00 pfe prim 1.460626e+308 1.460626e+308 0.000000e+00 |(xmax/4)*3 + i xmax| = |1.348270E+308 + i 1.797693e+308| = g77 Inf fsl Inf normal Inf kahan Inf pfe prim Inf