Figure 3: P. J. Plauger Standard C test results


Recaps of Tests Run on Selected Double Precision and Long Double
Precision Functions in Plauger's Standard C Library

           Double Precision
           ----------------

Significand: 53 Bits
Arithmetic:  Base 2

Test of exp(x) vs. xexp(x):

Test            (Log 2) Bits (Log 2) Bits Test
----              MRE   Lost  RMS E  Lost Range
                  ---   ----  -----  ---- -----
1: exp(x)        -52.70 0.30 -59.12  0.00 (-0.5*log(2),
                                           +0.5*log(2))
2: exp(x)        -52.50 0.50 -59.06  0.00 (-670, -0.5*log(2))
3: exp(x)        -52.65 0.35 -59.04  0.00 (10*log(2), +709)

Test of pow(x,p) vs. xpow(x,p):

Test            (Log 2) Bits (Log 2) Bits Test
----              MRE   Lost  RMS E  Lost Range
                  ---   ----  -----  ---- -----
1: pow(x,1)      -(INF) 0.00 -(INF)  0.00 (+0.5, +1)
2: pow(x*x,1.5)  -52.42 0.58 -58.99  0.00 (+0.5, +1)
3: pow(x*x,1.5)  -52.30 0.70 -59.03  0.00 (+1.0, +5.6438E+102)
4: pow(x,y)      -46.49 6.51 -53.54  0.00 x: (+0.01, +10)
                                          y: (-154.127, +154.127)

Test of sin(x) vs. xsin(x) & cos(x) vs. xcos(x):

Test            (Log 2) Bits (Log 2) Bits Test
----              MRE   Lost  RMS E  Lost Range
                  ---   ----  -----  ---- -----
1: sin(x)        -52.40 0.60 -58.79  0.00 (0.0, pi/2)
2: cos(x)        -51.93 1.07 -58.52  0.00 (0.0, pi/2)
3: sin(x)        -52.01 0.99 -58.44  0.00 (6*pi, 6.5*pi)
4: cos(x)        -51.83 1.17 -58.47  0.00 (7*pi, 7.5*pi)

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
         Long Double Precision
         ---------------------

Significand: 64 Bits
Arithmetic:  Base 2

Test of expl(x) vs. xexp(x):

Test            (Log 2) Bits (Log 2) Bits Test
----              MRE   Lost  RMS E  Lost Range
                  ---   ----  -----  ---- -----
1: expl(x)       -62.60 1.40 -68.98  0.00 (-0.5*log(2),
                                           +0.5*log(2))
2: expl(x)       -62.48 1.52 -68.95  0.00 (-11309, -0.5*log(2))
3: expl(x)       -62.59 1.41 -68.91  0.00 (10*log(2), +11356)

Test of powl(x,p) vs. xpow(x,p):

Test            (Log 2) Bits (Log 2) Bits Test
----             MRE    Lost  RMS E  Lost Range
                 ---    ----  -----  ---- -----
1: powl(x,1)     -(INF)  0.00 -(INF) 0.00 (+0.5, +1)
2: powl(x*x,1.5) -62.51  1.49 -68.84 0.00 (+0.5, +1)
3: powl(x*x,1.5) -62.38  1.62 -68.85 0.00 (+1.0, +1.0596E+1644)
4: powl(x,y)     -53.60 10.40 -60.56 3.44 x: (+0.01, +10)
                                          y: (-2466.04, +2466.04)

Test of sinl(x) vs. xsin(x) & cosl(x) vs. xcos(x):

Test            (Log 2) Bits (Log 2) Bits Test
----              MRE   Lost  RMS E  Lost Range
                  ---   ----  -----  ---- -----
1: sinl(x)       -63.18 0.82 -70.00  0.00 (0.0, pi/2)
2: cosl(x)       -62.93 1.07 -69.85  0.00 (0.0, pi/2)
3: sinl(x)       -63.04 0.96 -69.81  0.00 (6*pi, 6.5*pi)
4: cosl(x)       -62.98 1.02 -69.93  0.00 (7*pi, 7.5*pi)