From: Kbwms AT aol DOT com Message-ID: <5d383d06.361d591d@aol.com> Date: Thu, 8 Oct 1998 20:30:21 EDT To: Eric Rudd Cc: djgpp-workers AT delorie DOT com Mime-Version: 1.0 Subject: Re: libc math function upgrade work Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Mailer: AOL 3.0 16-bit for Windows sub 38 Reply-To: djgpp-workers AT delorie DOT com Dear Eric Rudd, Appended are two reports in Cody-Waite table format that recap the results of tests on 14 of your functions. These are the elementary math functions. In general, your functions perform as well or better on these tests than the equivalent functions in the new libm.a library. The exceptions are in the sine and cosine functions which do not perform adequately on large arguments. As you know, the Elefunt functions also perform tests for special values. I will forward the full reports separately. K.B. Williams ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ E R I C R U D D ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Significand: 53 Bits Arithmetic: Base 2 Test of acosh(x) vs. xacosh(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: acosh(x) -53.11 0.00 -59.29 0.00 (+1, +1.5) Test 2: acosh(x) -53.02 0.00 -59.02 0.00 (+1.5, +2) Test 3: acosh(x) -53.08 0.00 -59.16 0.00 (+2, +10) Test 4: acosh(x) -53.10 0.00 -58.95 0.00 (+35, +55) Test 5: acosh(x) -53.28 0.00 -59.07 0.00 (2^27, 2^108) Test of asin(x) vs. xasin(x) & acos(x) vs. xacos(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: asin(x) -53.03 0.00 -59.20 0.00 (-0.125, 0.125) Test 2: acos(x) -53.54 0.00 -59.38 0.00 (-0.125, 0.125) Test 3: asin(x) -53.06 0.00 -59.16 0.00 (0.5, 1) Test 4: acos(x) -53.04 0.00 -59.25 0.00 (0.5, 1) Test 5: acos(x) -53.10 0.00 -59.07 0.00 (-1, -0.5) Test of asinh(x) vs. xasinh(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: asinh(x) -53.05 0.00 -59.29 0.00 (+0, +0.5) Test 2: asinh(x) -53.06 0.00 -59.22 0.00 (+0.5, +1) Test 3: asinh(x) -53.12 0.00 -59.26 0.00 (+10, +1E+10) Test 4: asinh(x) -53.60 0.00 -59.48 0.00 (+1E+10, +1E+11) Test of atan(x) vs. xatan(x) & atan2(x,y) vs. xatan2(x,y): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: atan(x) -53.02 0.00 -59.25 0.00 (-0.0625, 0.0625) Test 2: atan(x) -53.02 0.00 -59.20 0.00 (0.0625, 1) Test 3: atan2(x,y) -53.07 0.00 -59.25 0.00 x: (-0.0625, +0.0625) y: (-0.0625, +0.0625) Test 4: atan2(x,y) -53.06 0.00 -59.18 0.00 x: (+0.0625, +1.5) y: (-1.5, -0.0625) Test of atanh(x) vs. xatanh(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: atanh(x) -53.06 0.00 -59.23 0.00 (+0, +0.5) Test 2: atanh(x) -53.07 0.00 -59.21 0.00 (+0.5, +1) Test 3: atanh(x) -53.02 0.00 -59.25 0.00 (+0.9375, +1) Test of exp(x) vs. xexp(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: exp(x) -53.12 0.00 -59.21 0.00 (-0.5*log(2), +0.5*log(2)) Test 2: exp(x) -52.85 0.15 -59.15 0.00 (-670, -0.5*log(2)) Test 3: exp(x) -52.79 0.21 -59.18 0.00 (10*log(2), +709) Test of log1p(x) vs xlog(1+x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: log1p(x) -53.06 0.00 -59.20 0.00 (-0.3125, 0.3125) Test 2: log1p(x) -53.05 0.00 -59.28 0.00 (-1.49E-08, 1.49E-08) Test 3: log1p(x) -53.04 0.00 -59.11 0.00 (16, 240) Test of log(x) vs xlog(x) and log10(x) vs xlog10(x) (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: log(x) -53.09 0.00 -59.27 0.00 (1-7.6E-06, 1+7.6E-06) Test 2: log(x) -53.07 0.00 -59.16 0.00 (sqrt(0.5), 15/16) Test 3: log10(x) -53.02 0.00 -59.24 0.00 (sqrt(0.1), 0.9) Test 4: log(x) -53.12 0.00 -59.10 0.00 (16, 240) Test of pow(x,p) vs. xpow(x,p): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: pow(x,1) -(INF) 0.00 -(INF) 0.00 (+0.5, +1) Test 2: pow(x*x,1.5) -53.10 0.00 -59.25 0.00 (+0.5, +1) Test 3: pow(x*x,1.5) -52.86 0.14 -59.20 0.00 (+1.0, +5.6438E+102) Test 4: pow(x,y) -53.04 0.00 -59.19 0.00 x: (+0.01, +10) y: (-154.127, +154.127) Test of sin(x) vs. xsin(x) & cos(x) vs. xcos(x) (1000 arguments per test): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: sin(x) -53.08 0.00 -59.38 0.00 (0.0, pi/2) Test 2: cos(x) -53.03 0.00 -59.36 0.00 (0.0, pi/2) Test 3: sin(x) -53.08 0.00 -59.37 0.00 (6*pi, 6.5*pi) Test 4: cos(x) -53.07 0.00 -59.38 0.00 (7*pi, 7.5*pi) Test 5: sin(x) 0.00 53.00 -5.48 47.52 (1e22, 1e31) Test 6: cos(x) 1.00 54.00 -4.69 48.31 (1e22, 1e31) Test of sinh(x) vs. xsinh(x) & cosh(x) vs. xcosh(x) (1000 arguments per test): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: sinh(x) -53.04 0.00 -59.26 0.00 (0, 0.5) Test 2: cosh(x) -53.01 0.00 -58.82 0.00 (0, 0.5) Test 3: sinh(x) -52.88 0.12 -59.20 0.00 (3, 709.78) Test 4: cosh(x) -52.89 0.11 -59.18 0.00 (3, 709.78) Test 5: sinh(x) -53.08 0.00 -59.23 0.00 (1E-07, 2E-07) Test of sqrt(x) vs. xsqrt(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: sqrt(x) -53.78 0.00 -59.62 0.00 (0.5, 1) Test 2: sqrt(x) -53.53 0.00 -59.51 0.00 (1, 2) Test of tan(x) vs. xtan(x) & cot(x) vs. xcot(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: tan(x) -53.05 0.00 -59.27 0.00 (0, pi/4) Test 2: tan(x) -53.07 0.00 -59.21 0.00 (0.875*pi, 1.125*pi) Test 3: tan(x) -53.02 0.00 -59.24 0.00 (6.000*pi, 6.250*pi) Test of tanh(x) vs. xtanh(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: tanh(x) -53.08 0.00 -59.28 0.00 (+0, +0.5493061443) Test 2: tanh(x) -53.66 0.00 -60.50 0.00 (+0.0625, 54+log(2)) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ N E W L I B M ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Significand: 53 Bits Arithmetic: Base 2 Test of acosh(x) vs. xacosh(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: acosh(x) -51.46 1.54 -58.20 0.00 (+1, +1.5) Test 2: acosh(x) -52.18 0.82 -58.62 0.00 (+1.5, +2) Test 3: acosh(x) -52.69 0.31 -59.05 0.00 (+2, +10) Test 4: acosh(x) -52.88 0.12 -58.94 0.00 (+35, +55) Test 5: acosh(x) -53.30 0.00 -59.11 0.00 (2^27, 2^108) Test of asin(x) vs. xasin(x) & acos(x) vs. xacos(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: asin(x) -53.12 0.00 -59.27 0.00 (-0.125, 0.125) Test 2: acos(x) -53.55 0.00 -59.44 0.00 (-0.125, 0.125) Test 3: asin(x) -53.00 0.00 -59.16 0.00 (0.5, 1) Test 4: acos(x) -53.04 0.00 -59.25 0.00 (0.5, 1) Test 5: acos(x) -52.85 0.15 -58.99 0.00 (-1, -0.5) Test of asinh(x) vs. xasinh(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: asinh(x) -51.47 1.53 -58.30 0.00 (+0, +0.5) Test 2: asinh(x) -51.56 1.44 -58.09 0.00 (+0.5, +1) Test 3: asinh(x) -53.27 0.00 -59.27 0.00 (+10, +1E+10) Test 4: asinh(x) -53.60 0.00 -59.43 0.00 (+1E+10, +1E+11) Test of atan(x) vs. xatan(x) & atan2(x,y) vs. xatan2(x,y): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: atan(x) -53.09 0.00 -59.26 0.00 (-0.0625, 0.0625) Test 2: atan(x) -53.05 0.00 -59.21 0.00 (0.0625, 1) Test 3: atan2(x,y) -52.33 0.67 -59.05 0.00 x: (-0.0625, +0.0625) y: (-0.0625, +0.0625) Test 4: atan2(x,y) -52.31 0.69 -58.94 0.00 x: (+0.0625, +1.5) y: (-1.5, -0.0625) Test of atanh(x) vs. xatanh(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: atanh(x) -51.45 1.55 -58.25 0.00 (+0, +0.5) Test 2: atanh(x) -52.34 0.66 -58.96 0.00 (+0.5, +1) Test 3: atanh(x) -52.89 0.11 -59.18 0.00 (+0.9375, +1) Test of exp(x) vs. xexp(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: exp(x) -53.03 0.00 -59.23 0.00 (-0.5*log(2), +0.5*log(2)) Test 2: exp(x) -53.03 0.00 -59.23 0.00 (-670, -0.5*log(2)) Test 3: exp(x) -53.07 0.00 -59.21 0.00 (10*log(2), +709) Test of log1p(x) vs xlog(1+x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: log1p(x) -51.60 1.40 -58.97 0.00 (-0.3125, 0.3125) Test 2: log1p(x) -53.06 0.00 -59.26 0.00 (-1.49E-08, 1.49E-08) Test 3: log1p(x) -53.10 0.00 -59.17 0.00 (16, 240) Test of log(x) vs xlog(x) and log10(x) vs xlog10(x) (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: log(x) -53.05 0.00 -59.24 0.00 (1-7.6E-06, 1+7.6E-06) Test 2: log(x) -53.01 0.00 -59.18 0.00 (sqrt(0.5), 15/16) Test 3: log10(x) -52.77 0.23 -59.19 0.00 (sqrt(0.1), 0.9) Test 4: log(x) -53.09 0.00 -59.10 0.00 (16, 240) Test of pow(x,p) vs. xpow(x,p): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: pow(x,1) -(INF) 0.00 -(INF) 0.00 (+0.5, +1) Test 2: pow(x*x,1.5) -53.08 0.00 -59.24 0.00 (+0.5, +1) Test 3: pow(x*x,1.5) -53.04 0.00 -59.24 0.00 (+1.0, +5.6438E+102) Test 4: pow(x,y) -53.10 0.00 -59.27 0.00 x: (+0.01, +10) y: (-154.127, +154.127) Test of sin(x) vs. xsin(x) & cos(x) vs. xcos(x) (1000 arguments per test): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: sin(x) -52.91 0.09 -59.27 0.00 (0.0, pi/2) Test 2: cos(x) -52.38 0.62 -58.99 0.00 (0.0, pi/2) Test 3: sin(x) -53.05 0.00 -59.37 0.00 (6*pi, 6.5*pi) Test 4: cos(x) -53.03 0.00 -59.38 0.00 (7*pi, 7.5*pi) Test 5: sin(x) -52.26 0.74 -58.98 0.00 (1e22, 1e31) Test 6: cos(x) -52.23 0.77 -59.03 0.00 (1e22, 1e31) Test of sinh(x) vs. xsinh(x) & cosh(x) vs. xcosh(x) (1000 arguments per test): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: sinh(x) -53.02 0.00 -59.27 0.00 (0, 0.5) Test 2: cosh(x) -52.82 0.18 -58.80 0.00 (0, 0.5) Test 3: sinh(x) -52.91 0.09 -59.22 0.00 (3, 709.78) Test 4: cosh(x) -52.44 0.56 -59.21 0.00 (3, 709.78) Test 5: sinh(x) -53.06 0.00 -59.24 0.00 (1E-07, 2E-07) Test of sqrt(x) vs. xsqrt(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: sqrt(x) -53.79 0.00 -59.65 0.00 (0.5, 1) Test 2: sqrt(x) -53.51 0.00 -59.48 0.00 (1, 2) Test of tan(x) vs. xtan(x) & cot(x) vs. xcot(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: tan(x) -53.05 0.00 -59.25 0.00 (0, pi/4) Test 2: tan(x) -53.06 0.00 -59.21 0.00 (0.875*pi, 1.125*pi) Test 3: tan(x) -53.01 0.00 -59.23 0.00 (6.000*pi, 6.250*pi) Test of tanh(x) vs. xtanh(x): (Log 2) Bits (Log 2) Bits Test MRE Lost RMS E Lost Range --- ---- ----- ---- ----- Test 1: tanh(x) -52.97 0.03 -59.26 0.00 (+0, +0.5493061443) Test 2: tanh(x) -53.29 0.00 -60.44 0.00 (+0.0625, 54+log(2))