Accuracy Information for the MASS Libraries for Linux

Product documentation


Abstract

This document provides accuracy data for the MASS scalar and vector libraries for Linux, and comparison with the standard system math library.

Content

Accuracy information for the MASS libraries for Linux

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 libmassv.a, libmassvp4.a, libmassvp5.a, libmassvp6.a, and libmassvp7.a MASS vector libraries, and the libmass_simdp7.a MASS SIMD library. The numbers are based on the results for at least 1000 random arguments for each floating-point base-two exponent in the specified ranges. (Denormalized arguments were omitted.) 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.

If the function (or the corresponding quadruple-precision 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 columns labelled massv, vp4, vp5, vp6, or vp7 list the results obtained with the libmassv.a, libmassvp4.a, libmassvp5.a, libmassvp6.a, or libmassvp7.a MASS vector libraries, respectively. The columns labelled massS list the results obtained with the libmass_simdp7.a MASS SIMD library.

Although the vector names (e.g. vacos) are used in the Function column, the libm and mass columns refers to the corresponding scalar function (e.g. acos).

The following range key applies to the POWER7 tables. The range key for the other tables is at the end. The range [0,1), for example, refers to arguments in the range 0 <= x < 1.

Range Key for POWER7

A  full range
B  +/-[2^-1023,2]
C  +[1,2^1024]
D  +[2^-1023,2^1024]
E  +[2^-127,2^128]
F  +/-[2^-1023,1]
G  +/-[2^-127,1]
H  +/-[2^-1023,2^36]
I  +/-[2^-127,2^10]
J  +/-[2^-127,2^5]
K  +/-[2^-1023,2^24]
L  +/-[2^-127,2^24]
M  +[2^-1023,1),(2,2^1024]
N  +[2^-1023,2^100]
O  +/-[2^-127,2]
P  +[1,2^128]
Q  +/-[2,2^128]

POWER7 vector MASS massvp7.a
Single and double precision functions
Maximum Observed Error (ulps) and PCR

function Range  PCR    maxerr
------------------------------
vacos      B   99.246 1.67e+00
vsacos     O   96.066 1.93e+00
vacosh     C   92.567 2.88e+00
vsacosh    P   81.208 2.05e+00
vasin      B   99.560 2.80e+00
vsasin     O   51.883 2.64e+00
vasinh     A   75.173 2.40e+00
vsasinh    A   72.626 2.35e+00
vatan      A   99.128 1.05e+00
vatan2     A   85.916 1.62e+00
vsatan2    D   85.726 7.18e+00
vsatan     E   47.064 3.97e+00
vatanh     F   77.464 3.00e+00
vsatanh    G   90.509 2.19e+00
vcbrt      A   83.906 1.00e+00
vscbrt     A   60.246 2.87e+00
vcos       H   99.355 1.36e+00
vscos      I   90.879 2.58e+00
vcosh      H   99.264 2.22e+00
vscosh     J   97.658 1.86e+00
vcosisin   H   99.384 1.36e+00
vscosisin  I   97.178 2.97e+00
vdiv       A   70.626 1.21e+00
vsdiv      A   83.076 2.93e+00
verf       D   97.479 3.00e+00
verfc      D   99.273 2.41e+00
vserfc     G   98.949 1.49e+01
vserfc     Q   99.030 1.62e+03
vserf      E   70.257 1.93e+00
vexp       A   99.918 7.42e-01
vexp2      A   99.561 2.00e+00
vsexp2     A   99.106 1.36e+00
vexp2m1    K   75.240 1.59e+00
vsexp2m1   L   24.139 2.59e+00
vsexp      A   99.144 1.44e+00
vexpm1     K   98.793 3.00e+00
vexpm1     J   11.683 2.72e+00
vhypot     A   89.266 2.00e+00
vshypot    A   87.389 1.97e+00
vlgamma    M   74.259 1.90e+01
vslgamma   E   68.562 6.97e+00
vlog       D   99.990 1.21e+00
vlog10     D   99.989 1.43e+00
vslog10    E   44.716 1.89e+00
vlog1p     N   90.330 2.00e+00
vslog1p    E   82.205 2.29e+00
vlog2      D   99.994 1.00e+00
vlog21p    N   87.245 2.05e+00
vslog21p   E   89.662 1.76e+00
vslog2     E   99.650 1.74e+00
vslog      E   74.872 1.77e+00
vpow       D   76.396 1.00e+00
vspow      E   99.978 5.24e-01
vqdrt      D   87.799 1.40e+00
vsqdrt     E   83.658 2.06e+00
vrcbrt     A   67.656 2.18e+00
vsrcbrt    A   51.486 3.10e+00
vrec       A   99.807 5.19e-01
vsrecf     A   99.332 2.48e+00
vrqdrt     D   93.282 1.25e+00
vsrqdrt    E   87.972 1.74e+00
vrsqrt     D   92.365 1.01e+00
vsrsqrt    E   92.338 1.30e+00
vsin       H   99.385 1.43e+00
vsincos    H   99.389 1.36e+00
vssincos   I   97.178 2.97e+00
vssin      I   95.527 2.13e+00
vsinh      A   99.375 1.91e+00
vssinh     J   10.993 3.12e+00
vsqrt      D   87.095 1.45e+00
vssqrt     E   87.126 1.79e+00
vtan       H   96.228 3.09e+00
vstan      I   90.872 3.51e+00
vtanh      A   89.587 3.73e+00
vstanh     A   53.509 4.00e+00

POWER7 SIMD MASS mass_simdp7.a
Single and double precision functions
Maximum Observed Error (ulps) and PCR

function  Rng   PCR    maxerr
------------------------------
acosd2     B   99.982 1.19e+00
acosf4     O   96.066 1.93e+00
acoshd2    C   92.567 2.88e+00
acoshf4    P   81.208 2.05e+00
asind2     B   99.560 2.80e+00
asinf4     O   51.883 2.64e+00
asinhd2    A   75.173 2.40e+00
asinhf4    A   72.626 2.35e+00
atan2d2    D   85.916 1.62e+00
atan2f4    E   85.726 7.18e+00
atanhd2    F   77.464 3.00e+00
atanhf4    G   90.509 2.19e+00
cbrtd2     A   91.676 1.00e+00
cbrtf4     A   60.246 2.87e+00
cosd2      H   99.384 1.36e+00
cosf4      I   90.879 2.58e+00
coshd2     H   99.468 1.10e+00
coshf4     J   97.658 1.86e+00
divd2      A   74.314 1.48e+00
divf4      A   83.076 2.93e+00
erfd2      D   96.410 9.47e-01
erfcd2     D   99.273 2.41e+00
erfcf4     G   98.949 1.49e+01
erfcf4     Q   99.030 1.62e+03
erff4      E   70.257 1.93e+00
expd2      A   99.918 7.42e-01
exp2d2     A   99.561 2.00e+00
exp2f4     A   99.106 1.36e+00
exp2m1d2   K   75.240 1.59e+00
exp2m1f4   L   24.139 2.59e+00
expf4      A   99.144 1.44e+00
expm1d2    K   98.793 3.00e+00
expm1f4    J   11.683 2.72e+00
hypotd2    A   89.266 2.00e+00
hypotf4    A   87.389 1.97e+00
lgammad2   M   74.259 1.90e+01
lgammaf4   E   68.562 6.97e+00
logd2      D   87.506 1.19e+00
log10d2    D   87.522 1.10e+00
log10f4    E   44.716 1.89e+00
log1pd2    N   90.330 2.00e+00
log1pf4    E   82.205 2.29e+00
log2d2     D  100.000 1.00e+00
log21pd2   N   87.245 2.05e+00
log21pf4   E   89.662 1.76e+00
log2f4     E   99.650 1.74e+00
logf4      E   74.872 1.77e+00
powd2      D   49.749 1.92e+00
powf4      E   77.830 9.78e+01
qdrtd2     D   91.174 1.39e+00
qdrtf4     E   83.658 2.06e+00
rcbrtd2    A   69.497 1.80e+00
rcbrtf4    A   51.486 3.10e+00
recipd2    A   99.807 5.19e-01
recipf4    A   99.332 2.48e+00
rqdrtd2    D   93.282 1.25e+00
rqdrtf4    E   87.972 1.74e+00
rsqrtd2    D   92.365 1.01e+00
rsqrtf4    E   92.338 1.30e+00
sind2      H   99.415 1.43e+00
sincosd2   H   99.384 1.36e+00
sincosf4   I   97.178 2.97e+00
sinf4      I   95.527 2.13e+00
sinhd2     A   94.907 3.14e+00
sinhf4     J   10.993 3.12e+00
sqrtd2     D   87.095 1.45e+00
sqrtf4     E   87.126 1.79e+00
tand2      H   98.698 2.50e+00
tanf4      I   90.872 3.51e+00
tanhd2     A   99.380 2.89e+00
tanhf4     A   53.509 4.00e+00

Results for other than POWER7 libraries

Maximum Observed Error (ulps) -- double-precision functions

Function  Range libm  mass   vp4   vp5   vp6
============================================
vacos        B   .50  1.38  2.13  2.13  2.13
vacosh       G        0.00  2.00  2.00  2.00
vasin        B   .50  1.88  2.18  2.18  2.18
vasinh       D        0.00  3.00  3.00  3.00
vatan        B        1.04                  
vatan        D        1.48                  
vatan2       D   .50  1.67  1.95  1.95  1.95
vatanh       B        0.00  3.00  3.00  3.00
vcbrt        D        1.16  1.16  1.16  1.16
vcopysign    D        0.00                  
vcos         B        1.18  1.11  1.11  1.11
vcos         D   .50  1.47  1.47  1.47  1.47
vcosh        D   .99  1.10  2.70  2.70  2.70
vcosisin     B        1.18  1.15  1.15  1.15
vcosisin     D   .50  1.47  1.47  1.47  1.47
vdint        D  0.00        0.00  0.00  0.00
vdiv         D   .50        1.42  1.42  1.42
vdnint       D  0.00  0.00  0.00  0.00  0.00
verf         C        1.24                  
verfc        C        2.29                  
vexp         D   .50   .67   .67   .67   .67
vexpm1       D   .77  2.11  2.11  2.11  2.11
vhypot       D        0.00                  
vlgamma      H        1.95                  
vlog         C   .50  1.14  1.75  1.75  1.75
vlog10       C  1.60  2.59  2.59  2.59  2.59
vlog1p       H   .76  1.58  1.58  1.58  1.58
vpow         C   .50   .65   .60   .60   .60
vqdrt        C   .85        1.42  1.42  1.42
vrcbrt       D              1.02  1.02  1.02
vrec         D   .50         .52   .52   .52
vrqdrt       C  1.30        1.04  1.04  1.04
vrsqrt       C  1.50   .56   .56   .99   .99
vsin         B         .82  1.39  1.39  1.39
vsin         D   .50  1.44  1.44  1.44  1.44
vsincos      B        1.18  1.15  1.15  1.15
vsincos      D   .50  1.47  1.47  1.47  1.47
vsinh        D  1.80  3.13  1.94  1.94  1.94
vsqrt        C   .50   .60  1.02   .75   .75
vtan         D   .50  2.67  3.23  3.23  3.23
vtanh        F  2.00  2.52  3.00  3.00  3.00


Maximum Observed Error (ulps) -- single-precision functions

Function  Range libm  mass   vp4   vp5   vp6
============================================
vsacos       B   .50   .54   .56   .56   .56
vsacosh      G         .51   .51   .51   .51
vsasin       B   .50   .54   .56   .56   .56
vsasinh      D         .52   .50   .50   .50
vsatan       B         .54                  
vsatan       D         .53                  
vsatan2      D   .50   .50   .70   .70   .70
vsatanh      B         .51   .51   .51   .51
vscbrt       D         .53   .53   .53   .53
vscopysign   D        0.00                  
vscos        B         .51   .51   .51   .51
vscos        D   .50   .51   .51   .51   .51
vscosh       D  1.00   .53   .53   .53   .53
vscosisin    B               .51   .51   .51
vscosisin    D   .50         .51   .51   .51
vsdiv        D   .50        1.46  1.46  1.44
vserf        C         .58                  
vserfc       C         .55                  
vsexp        D  1.00   .53   .53   .53   .53
vsexpm1      D   .50   .50   .50   .50   .50
vshypot      D         .50                  
vslgamma     H         .50                  
vslog        C   .50   .51   .51   .51   .51
vslog10      C   .50   .51   .51   .51   .51
vslog1p      H   .50   .51   .51   .51   .51
vspow        C  1.00   .53   .53   .53   .53
vsqdrt       C   .85         .56   .56   .56
vsrcbrt      D               .51   .51   .51
vsrec        D   .50         .50   .50   .50
vsrint       D        0.00                  
vsrqdrt      C   .98         .52   .52   .52
vsrsqrt      C  1.50         .88  1.29  1.29
vssin        B         .50   .51   .51   .51
vssin        D   .50   .51   .51   .51   .51
vssincos     B               .51   .51   .51
vssincos     D   .50         .51   .51   .51
vssinh       D   .50   .53   .53   .53   .53
vssqrt       C   .50        1.08  1.23  1.23
vstan        D   .50   .51   .68   .68   .68
vstanh       F   .50   .57   .74   .74   .74

PCR -- double-precision functions

Function  Range libm   mass    vp4    vp5    vp6
=================================================
vacos        B 100.00  88.00  85.00  85.00  85.00
vacosh       G        100.00  86.00  86.00  86.00
vasin        B 100.00  87.00  69.00  69.00  69.00
vasinh       D 100.00 100.00  93.00  93.00  93.00
vatan        B         94.00                    
vatan        D         99.00                    
vatan2       D 100.00  86.00  84.00  84.00  84.00
vatanh       B        100.00  77.00  77.00  77.00
vcbrt        D         85.00  85.00  85.00  85.00
vcopysign    D        100.00                    
vcos         B         92.00  86.00  86.00  86.00
vcos         D 100.00  84.00  83.00  83.00  83.00
vcosh        D  99.90  92.00  58.00  58.00  58.00
vcosisin     B         95.00  91.00  91.00  91.00
vcosisin     D 100.00  84.00  84.00  84.00  84.00
vdint        D 100.00        100.00 100.00 100.00
vdiv         D 100.00         74.00  74.00  74.00
vdnint       D 100.00 100.00 100.00 100.00 100.00
verf         C        100.00                    
verfc        C         91.00                    
vexp         D 100.00  97.00  97.00  97.00  97.00
vexpm1       D  99.90  99.00  99.00  99.00  99.00
vhypot       D        100.00                    
vlgamma      H         66.00                    
vlog         C  50.10 100.00  99.00  99.00  99.00
vlog10       C  85.40  99.00  99.00  99.00  99.00
vlog1p       H 100.00  99.00  99.00  99.00  99.00
vpow         C 100.00  97.00  97.00  97.00  97.00
vqdrt        C  81.20         76.00  76.00  76.00
vrcbrt       D                87.00  87.00  87.00
vrec         D 100.00        100.00 100.00 100.00
vrqdrt       C  84.60         86.00  86.00  86.00
vrsqrt       C  87.00  99.00  97.00  85.00  85.00
vsin         B         97.00  92.00  92.00  92.00
vsin         D 100.00  84.00  83.00  83.00  83.00
vsincos      B         95.00  91.00  91.00  91.00
vsincos      D 100.00  84.00  84.00  84.00  84.00
vsinh        D  99.20  57.00  83.00  83.00  83.00
vsqrt        C 100.00  97.00  87.00  87.00  87.00
vtan         D 100.00  64.00  54.00  54.00  54.00
vtanh        F  98.60  91.00  57.00  57.00  57.00

PCR -- single-precision functions

Function  Range libm   mass    vp4    vp5    vp6
=================================================
vsacos       B 100.00  99.00  99.00  99.00  99.00
vsacosh      G        100.00 100.00 100.00 100.00
vsasin       B 100.00  99.00  98.00  98.00  98.00
vsasinh      D        100.00 100.00 100.00 100.00
vsatan       B         98.00                    
vsatan       D        100.00                    
vsatan2      D 100.00 100.00  99.00  99.00  99.00
vsatanh      B        100.00 100.00 100.00 100.00
vscbrt       D         99.00  99.00  99.00  99.00
vscopysign   D        100.00                    
vscos        B         99.00  99.00  99.00  99.00
vscos        D 100.00 100.00 100.00 100.00 100.00
vscosh       D  99.80  99.00  99.00  99.00  99.00
vscosisin    B               100.00 100.00 100.00
vscosisin    D 100.00        100.00 100.00 100.00
vsdiv        D 100.00         74.00  74.00  74.00
vserf        C        100.00                    
vserfc       C        100.00                    
vsexp        D  99.80  99.00  99.00  99.00  99.00
vsexpm1      D 100.00 100.00 100.00 100.00 100.00
vshypot      D        100.00                    
vslgamma     H        100.00                    
vslog        C 100.00 100.00 100.00 100.00 100.00
vslog10      C 100.00 100.00 100.00 100.00 100.00
vslog1p      H 100.00 100.00 100.00 100.00 100.00
vspow        C  99.90  99.00  99.00  99.00  99.00
vsqdrt       C  45.10         97.00  97.00  97.00
vsrcbrt      D               100.00 100.00 100.00
vsrec        D 100.00        100.00 100.00 100.00
vsrint       D        100.00                    
vsrqdrt      C  93.40         99.00  99.00  99.00
vsrsqrt      C  86.60         88.00  58.00  58.00
vssin        B        100.00 100.00 100.00 100.00
vssin        D 100.00 100.00 100.00 100.00 100.00
vssincos     B               100.00 100.00 100.00
vssincos     D 100.00        100.00 100.00 100.00
vssinh       D 100.00  99.00  99.00  99.00  99.00
vssqrt       C 100.00         84.00  61.00  61.00
vstan        D 100.00 100.00  98.00  98.00  98.00
vstanh       F 100.00 100.00  95.00  95.00  95.00

Range Key                   

A      0,1                          
B     -1,1
C      0,100
D   -100,100
E    -10,10
F    -20,20
G      1,100
H     -1,100
I      0,10


Original publication date

2007/7/20

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Mathematical Acceleration Subsystem
Libraries

Software version:

6.0

Operating system(s):

Linux

Reference #:

7007062

Modified date:

2010-12-23

Translate my page

Machine Translation

Content navigation