IBM Support

Accuracy information for the MASS libraries for Linux (Little Endian)

Product Documentation


Abstract

This document proides accuracy data for the MASS scalar, SIMD, and vector libraries for Linux (Little Endian), and comparison with the standard system math library.

Content

Accuracy information for the MASS libraries for Linux (Little Endian)

In some cases MASS is not as accurate as the system math library, and it may handle edge cases differently (sqrt(Inf), for example). The following tables provide sample accuracy data for the libm.a system library, the libmass.a MASS scalar library, the libmassvp8.a and libmassvp9.a MASS vector libraries, and the libmass_simdp8.a and libmass_simdp9.a MASS SIMD libraries. The numbers are based on the results for at least 1000 random arguments for each floating-point base-two exponent in the specified ranges. Quadruple-precision functions or a multiple-precision library were used to compute the errors. There may be portions of the valid input argument range for which accuracy is not as good as illustrated in the table.
The version of libm.a used was the one installed on the test machine, which may differ from that used for previous versions of MASS.

If the function does not exist, or if the measurement was not done, the entry is left blank.

The observed errors are given in units in the last place (ulps). The entries in the percent correctly rounded (PCR) column are obtained by counting the number of correctly rounded results out of the tested random arguments. A result is correctly rounded when the function returns the floating-point number that is closest to the exact (infinite-precision) result.

The column labelled libm lists the results obtained with the libm.a system math library. The column labelled v lists the results obtained with the libmassvp8.a and libmassvp9.a MASS vector libraries. The column labelled simd lists the results obtained with the libmass_simdp8.a and libmass_simdp9.a MASS SIMD libraries.

The Function column shows the name of the basic mathematical function. The names of the corresponding libm and MASS functions can be determined from it. For example, for double precision, acos corresponds to libm and scalar MASS function acos, SIMD MASS function acosd2, and vector MASS function vacos. For single precision, acos corresponds to libm and scalar MASS function acosf, SIMD MASS function acosf4, and vector MASS function vsacos.

In the Range Key, the range [0,1), for example, refers to arguments in the range 0 <= x < 1. This refers to the argument range over which the given accuracy was observed (which is not necessarily the maximal valid argument range of the function).


Range Key

A   [-2^1023, 2^1024) Full DP range
B   [-2^127, 2^128)   Full SP range
C   [-2^33, 2^25)
D   [-2^36, 2^34)
E   +/-[2^-124, 2^128)
F   [-2^36, 2^37)
G   [-2^33, 2^34)
H   [-2^6, 2^7)
I   [-2^5, 2^6)
J   [-2^-1, 2^1024)
K   [-2^50, 2^51)  
L   [-2^50, 2^51)
M   [-2^7, 2^8)


Maximum Observed Error (ulps) -- Double Precision

Function Range libm     Range mass  Range simd   Range  v
==========================================================

acos     A     0.50      A   1.43     A   2.77     A  1.43
acosh    A     2.00      A   3.00     A   3.00     A  3.00
asin     A     0.50      A   1.86     A   5.21     A  1.86
asinh    A     1.67      A   2.65     A   3.33     A  3.33
atan     A     0.85      A   1.70     A   1.91     A  2.69
atan2    A     1.43      A   1.75     A   4.86     N  2.28
atanh    A     1.72      A   3.59     A   2.90     A  2.90
cbrt     A     3.55      A   1.22     A   0.50     A  0.50
cos      K     0.50      K   2.92     C   2.93     K  2.92
cosh     A     1.02      A   1.24     A   2.55     A  1.24
div      -      -        -    -       A   4.34     A  4.34
erf      A     1.25      A   1.48     A   1.50     A  1.48
exp      A     1.00      A   1.00     A   1.00     A  2.54
expm1    A     0.74      A   2.32     A   2.32     A  2.13
hypot    A     1.00      A   1.00     A   2.17     A  2.17
log      A     0.50      A   1.40     A   1.40     A  1.19
log10    A     1.59      A   3.12     A   1.57     A  3.12
log1p    A     0.76      J   2.33     A   2.33     A  2.14
log2     -     -         -    -       A   1.16     A  1.16
qdrt     -     -         -    -       A   1.52     A  1.61
rcbrt    -     -         -    -       A   1.05     A  0.50
rqdrt    -     -         -    -       A   1.19     A  1.19
rsqrt    -     -         A   0.57     A   1.02     A  1.02
sin      K     0.50      K   2.59     F   3.57     K  2.86
sincos   K     0.50      K   2.86     G   3.64     K  2.92
sinh     A     1.55      A   2.89     A   2.89     A  2.20
sqrt     A     0.50      A   0.62     A   1.74     A  1.74
tan      K     0.50      K   3.54     D   4.20     K  3.36
tanh     A     2.19      A   4.11     A   4.04     A  3.47


Maximum Observed Error (ulps) -- Single Precision

Function Range libm     Range mass  Range simd   Range  v
==========================================================
acosf    B    0.89       B   0.50     B   2.22     B  2.22
acoshf   B    1.91       B   0.50     B   3.29     B  3.29
asinf    B    0.86       B   0.50     B   3.46     B  3.46
asinhf   B    1.70       B   0.50     B   3.44     B  3.49
atan2f   B    1.47       B   0.50     B   15.1     B  15.1
atanf    B    0.85       B   0.50     B   4.03     B  4.03
atanhf   B    1.70       B   0.50     B   3.13     B  3.13
cbrtf    B    0.97       B   0.50     A   2.88     B  2.88
cosf     K    1.45       L   0.51     M   5.33     I  3.55
coshf    B    1.85       B   0.53     B   2.00     B  2.00
divf     -     -         -    -       B   4.27     B  4.27
exp2f    -     -         -    -       B   1.79     B  1.79
exp2m1f  -     -         -    -       E   2.61     E  2.61
expf     B    0.50       B   0.53     B   1.79     B  1.79
hypotf   B    0.50       B   0.50     B   2.16     B  2.16
lgammaf  B    Inf        B   0.50     B   7.15     B  7.15
log10f   B    2.03       B   0.52     B   5.12     B  5.12
log1pf   B    0.83       B   0.57     B   2.93     B  2.93
log2f    -     -         -    -       B   3.28     B  3.28
logf     B    0.82       B   0.51     B   2.91     B  2.91
qdrtf    -     -         -    -       B   2.42     B  2.42
rcbrtf   -     -         -    -       B   3.21     B  3.21
rqdrtf   -     -         -    -       B   1.86     B  1.86
rsqrtf   -     -         -    -       B   1.00     B  1.00
sincosf  -     -         -    -       H   4.40     H  3.04
sinf     L    1.35       L   0.51     I   2.44     I  2.94
sinhf    B    1.85       B   0.53     B   3.81     B  3.81
sqrtf    -     -         -    -       B   1.71     B  1.71
tanf     L    2.66       L   0.50     I   4.41     I  4.37
tanhf    B    2.19       B   0.57     B   5.11     B  5.11


PCR -- Double Precision

Function Range libm     Range mass  Range simd   Range  v
=============================================================
acos     A    100.00      A   99.98    A   99.98     A  99.27
acosh    A     95.23      A   99.96    A   92.73     A  92.73
asin     A    100.00      A   99.97    A   99.97     A  99.49
asinh    A     90.25      A   99.91    A   70.45     A  70.45
atan     A     99.99      A   99.97    A   99.96     A  99.13
atan2    A     99.80      A   99.80    A   94.01     N  94.01 
atanh    A     99.68      A   97.01    A   85.04     A  85.04
cbrt     A     45.20      A   85.13    A   99.99     A  99.99
cos      K    100.00      K   98.54    C   99.09     K  97.50 
cosh     A     99.91      A   99.71    A   99.71     A  99.62
div      -      -         -     -      A   80.07     A  80.07
erf      A     96.31      A   96.34    A   96.34     A  95.40
exp      A    100.00      A   99.94    A   99.94     A  99.44
expm1    -      -         A   99.26    A   99.26     A  84.94
hypot    A     99.71      A   99.70    A   76.32     A  76.32 
log      A    100.00      A   99.99    A   99.99     A  87.41
log10    A     99.89      A   99.99    A   99.99     A  87.46
log1p    A    100.00      J   70.53    A   89.91     J  84.36
log2     -     -          -    -       A   99.99     A  99.96
qdrt     -     -          -    -       A   90.22     A  87.22
rcbrt    -     -          -    -       A   99.89     A  88.04
rqdrt    -     -          -    -       A   91.82     A  91.82
rsqrt    -     -          A   99.28    A   93.50     A  93.50
sin      K     100.00     K   98.21    F   98.56     K  74.97
sincos   K     100.00     K   98.38    G   98.80     K  86.24
sinh     A     100.00     A   92.89    A   92.89     A  92.22
sqrt     A     100.00     A   98.30    A   84.86     A  84.86
tan      K     100.00     K   98.33    D   98.81     K  73.87
tanh     A     99.32      A   99.32    A   99.32     A  84.52


PCR -- Single Precision

Function Range libm     Range mass  Range simd   Range  v
============================================================
acosf    B    99.89      B   99.99    B   96.53     B  96.53
acoshf   B    94.55      B  100.00    B   82.73     B  82.73
asinf    B    99.90      B   99.97    B   55.63     B  55.63
asinhf   B    86.63      B   99.99    B   70.19     B  70.19
atan2f   B    77.48      B  100.00    B   88.92     B  88.92
atanf    B    99.87      B   99.96    B   51.52     B  51.52
atanhf   B    98.90      B   99.98    B   90.74     B  90.74
cbrtf    B    89.66      B   98.65    B   62.00     B  62.00
cosf     K    97.43      L   99.85    M   92.56     I  99.40 
coshf    B    99.62      B   99.97    B   98.80     B  98.80
divf     -     -         -     -      B   81.07     B  81.07
exp2f    -     -         -     -      B   99.20     B  99.20
exp2m1f  -     -         -     -      E   58.18     E  58.18
expf     B   100.00      B   99.95    B   99.16     B  99.16
hypotf   B   100.00      B  100.00    B   75.83     B  75.83
lgammaf  B    88.62      B  100.00    B   54.08     B  54.08
log10f   B    99.36      B  100.00    B   72.08     B  72.08
log1pf   B    99.76      B   99.94    B   84.61     B  84.61
log2f    -     -         -     -      B   98.86     B  98.86
logf     B    99.72      B  100.00    B   86.86     B  86.86
qdrtf    -     -         -     -      B   82.16     B  82.16
rcbrtf   -     -         -     -      B   57.07     B  57.07
rqdrtf   -     -         -     -      B   88.50     B  88.50
rsqrtf   -     -         -     -      B   93.58     B  93.58
sincosf  -     -         -     -      H   97.71     H  97.71  
sinf     L    97.55      L   99.86    I   97.06     I  97.06
sinhf    B    98.50      B   99.98    B   52.73     B  52.73
sqrtf    -     -         -     -      B   84.75     B  84.75
tanf     L    99.04      L   99.84    I   93.12     I  93.12
tanhf    B    97.50      B   99.95    B   56.83     B  56.83








[{"Product":{"code":"SSVKBV","label":"Mathematical Acceleration Subsystem"},"Business Unit":{"code":"BU050","label":"BU NOT IDENTIFIED"},"Component":"Libraries","Platform":[{"code":"PF016","label":"Linux"}],"Version":"8.1.5","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
21 June 2018

UID

swg27051070