IBM Support

Accuracy information for the MASS libraries for Blue Gene

Product Documentation


Abstract

This document provides accuracy data for the MASS scalar, SIMD, and vector libraries for Blue Gene.

Content

Accuracy information for the SIMD and vector MASS libraries for Blue Gene/Q

In some cases MASS is not as accurate as the system math library, and it may handle edge cases differently. The following table provides sample accuracy data for the SIMD library libmass_simd and the vector library libmassv on BG/Q. The data shown in the table applies to both the SIMD and the vector libraries.

The func column gives the base name of the function. For example, acos refers to the SIMD functions acosd4 (double precision), acosf4 (single precision), and the vector functions vacos (double precision) and vscos (single precision). The names cosisin_c and sincos_c refer to the cosine output of the cosisin and sincos functions respectively, and the names cosisin_s and sincos_s refer to the sine output.

The range column identifies the range over which the maximum error (max ulps column) was computed. The two-argument functions have two range letters, which refer to the first and second arguments, respectively. The range key following the table gives the ranges that correspond to the range letters.

The max ulps column shows the maximum observed error in ulps (units in the last place). The number of random arguments per floating-point exponent in the specified range used to compute the errors was 1000 for the single-argument functions, and 128 for each argument for the two-argument functions. The Linux system quadruple-precision functions, or multiple-precision functions where necessary, 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 entries in the percent correctly rounded (PCR) column were obtained by counting the number of correctly rounded results out of the tested arguments. The PCR column applies to the full floating-point range. A result is correctly rounded when the function returns the floating-point number that is closest to the exact (infinite-precision) result.

The accuracy measurements were performed on a Blue Gene/Q machine.


         ======= double precision ======   ===== single precision =====
                              full range                     full range
func     range    max ulps       PCR       range    max ulps      PCR
-----------------------------------------------------------------------
acos       A        1.46        99.27        A        0.50       100.00
acosh      A        3.00        92.76        A        1.00        88.47
asin       A        3.12        99.37        A        0.50       100.00
asinh      A        4.61        37.06        A        1.00        25.78
atan       A        1.20        99.06        A        0.50       100.00
atan2      AA       2.15        93.91        AA       0.51       100.00
atanh      A        3.99        51.52        A        1.00        53.73
cbrt       A        2.42        67.59        A        0.93        94.04
cos        B        3.38        98.40        M        0.53        99.98
cosisin_c  B        3.38        98.40        M        0.53        99.98
cosisin_s  K        3.74        98.11        M        0.54        99.98
cosh       A        1.87        99.59        A        0.54        99.00
div        AC       1.56        80.03
div        AA       3.06        80.03        AA       0.50       100.00
div_fast   AD       1.56        77.94        AA       0.56        99.19
div_fast   AE       3.06        77.94
erf        A        1.46        95.23        A        0.50       100.00
erfc       F        2.38        99.54        A        0.50       100.00
exp        A        2.22        99.85        A        0.54        99.89
exp10      A        1.56        99.85        A        0.55        99.88
exp2       A        2.00        99.86        A        0.54        99.88
exp2m1     A        2.00        89.39        A        1.48        69.26
expm1      A        2.38        84.92        A        1.48        58.86
hypot      A        2.34        75.68        A        0.50       100.00
lgamma     A       10.50        82.91        A        0.50       100.00
log        A        3.60        87.40        A        1.46        99.94
log10      A        3.49        87.49        A        1.45        99.94
log1p      A        4.26        46.40        A        1.59        57.61
log2       A        3.53        99.97        A        1.48        99.94
log21p     A        3.90        54.11        A        1.59        65.97
pow        JG       2.68        99.83        AA      12.70        99.99
pow        JH       5.93        99.83
pow        AA     660.00        99.83
qdrt       A        1.66        89.84        A        0.50       100.00
rcbrt      A        1.57        78.56        A        0.59        99.29
recip      A        0.50       100.00        A        0.50       100.00
recip_fast E        1.00        96.83        A        0.53        99.10
rqdrt      A        5.09        67.53        A        0.50       100.00
rsqrt      A        0.99        92.81        A        0.55        98.74
sin        K        3.74        98.11        M        0.54        99.98
sincos_c   B        3.38        98.00        M        0.51        99.98
sincos_s   K        3.81        98.11        M        0.53        99.98
sinh       A        2.38        83.81        A        1.47        55.69
sqrt       A        2.07        84.62        A        0.59        98.49
tan        L        4.69        97.46        M        0.70        99.98
tanh       A        3.64        84.55        A        1.52        57.76

Range Key
The range (a,b) means between but not including a and b.

A       full range
B       (-2^27, 2^26)
C       (-2^1022,2^1022)
D       (-2^1022,2^1022) excluding (-2^-1024,0),(0,2^-1024)
E       full range excluding (-2^-1024,0),(0,2^-1024)
F       < 2
G       (-2^6,2^6)
H       (-2^7,2^7)
J       (-2^6,-2^-6), (2^-6,2^6)
K       (-2^27, 2^26)
L       (-2^27, 2^30)
M       (-2^50,2^50)


Accuracy information for the MASS libraries for Blue Gene/L and Blue Gene/P

Accuracy Data for the Scalar and Vector libraries

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 system library (libm), libmass, and libmassv. The numbers are based on the results for 100000 random values in the specified ranges. The Linux system quadruple-precision functions 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 system function (or the corresponding quadruple-precision function) does not exist, or there was a problem with the quadruple-precision function, the libm entry is left blank.

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 accuracy measurements were performed on a Blue Gene/P machine, but the results are also representative of Blue Gene/L.

Accuracy of MASS Libraries



           R
           a
           n       libm           libmass         libmassv
           g   PCR    maxerr    PCR    maxerr    PCR    maxerr
function   e    %      ulps      %      ulps      %      ulps
-----------------------------------------------------------------
vacos      B 100.00    0.50    88.00    1.36    85.00    1.46
vacosh     G  88.00    1.10    92.00    0.89    92.00    0.94
vasin      B 100.00    0.50    89.00    1.81    68.00    1.65
vasinh     D  94.00    0.66    94.00    0.87    96.00    0.95
vatan      B 100.00    0.50    93.00    0.76
           D 100.00    0.50    99.00    0.77
vatan2     D 100.00    0.50    87.00    1.37    83.00    1.41
vatanh     B  82.00    1.14    83.00    1.25    78.00    1.26
vcbrt      D  54.00    2.19    86.00    0.93    86.00    0.93
vcopysign  D 100.00    0.00   100.00    0.00
vcos       B 100.00    0.50    92.00    0.93    85.00    0.88
           D 100.00    0.50    83.00    1.02    82.00    1.02
vcosh      D  95.00    0.96    92.00    0.96    57.00    1.82
vcosisin   B 100.00    0.50    95.00    0.93    91.00    0.94
           D 100.00    0.50    83.00    1.02    83.00    0.97
vdint      D                                   100.00    0.00
vdiv       D                                    72.00    2.00
vdnint     D 100.00    0.00   100.00    0.00   100.00    0.00
verf       C 100.00    0.49   100.00    0.56
verfc      C  91.00    1.64    83.00   45.e1
vexp       D 100.00    0.50    96.00    0.57    96.00    0.61
vexpm1     D  94.00    0.72    99.00    0.89    99.00    0.89
vhypot     D  87.00    0.82    85.00    0.95
vlgamma    H  65.00    1.45    67.00    1.45
vlog       C 100.00    0.50   100.00    0.51   100.00    0.51
vlog10     C  94.00    0.85    99.00    0.51    99.00    0.51
vlog1p     H  97.00    0.61    99.00    0.57    99.00    0.57
vpow       C 100.00    0.50    97.00    0.57    97.00    0.57
vqdrt      C                                    75.00    1.07
vrcbrt     D                                    90.00    0.84
vrec       D                                    91.00    2.16
vrqdrt     C                                    84.00    0.92
vrsqrt     C  73.00    1.32    84.00    0.84    84.00    0.84
vsacos     B  93.00    0.74    99.00    0.52    99.00    0.54
vsacosh    G  86.00    0.99   100.00    0.50   100.00    0.50
vsasin     B  92.00    0.66    99.00    0.53    98.00    0.55
vsasinh    D  93.00    0.83   100.00    0.50   100.00    0.50
vsatan     B  96.00    0.66    98.00    0.53
           D  99.00    0.62   100.00    0.50
vsatan2    D  82.00    1.00   100.00    0.50    98.00    0.56
vsatanh    B  82.00    1.28   100.00    0.50   100.00    0.50
vscbrt     D  90.00    0.85    99.00    0.53    99.00    0.53
vscopysign D 100.00    0.00   100.00    0.00
vscos      B  86.00    1.07    99.00    0.51    99.00    0.51
           D  92.00    0.97   100.00    0.50   100.00    0.50
vscosh     D  97.00    1.08    99.00    0.52    99.00    0.52
vscosisin  B                                   100.00    0.51
           D                                   100.00    0.51
vsdiv      D                                    77.00    1.25
vserf      C 100.00    0.49   100.00    0.55
vserfc     C  96.00    3.24   100.00    0.50
vsexp      D 100.00    0.50    99.00    0.52    99.00    0.52
vsexpm1    D  96.00    0.73   100.00    0.50   100.00    0.50
vshypot    D  89.00    0.79   100.00    0.50
vsin       B 100.00    0.50    97.00    0.68    94.00    1.25
           D 100.00    0.50    83.00    0.93    82.00    1.01
vsincos    B 100.00    0.50    95.00    0.93    91.00    0.94
           D 100.00    0.50    83.00    1.02    83.00    0.97
vsinh      D  95.00    1.72    55.00    2.18    83.00    1.28
vslgamma   H  66.00    1.55   100.00    0.50
vslog      C  97.00    0.59   100.00    0.50   100.00    0.50
vslog10    C  92.00    1.05   100.00    0.50   100.00    0.50
vslog1p    H  96.00    0.60   100.00    0.50   100.00    0.50
vspow      C  66.00   15.57    99.00    0.51    99.00    0.51
vsqdrt     C                                    97.00    0.54
vsqrt      C 100.00    0.50    72.00    1.53   100.00    0.50
vsrcbrt    D                                    99.00    0.51
vsrec      D                                    97.00    0.65
vsrint     D 100.00    0.00   100.00    0.00
vsrqdrt    C                                    99.00    0.51
vsrsqrt    C                                    99.00    0.54
vssin      B  93.00    1.03   100.00    0.50   100.00    0.50
           D  90.00    1.12   100.00    0.51   100.00    0.51
vssincos   B                                   100.00    0.51
           D                                   100.00    0.51
vssinh     D  94.00    1.08    99.00    0.52    99.00    0.52
vssqrt     C                                   100.00    0.50
vstan      D  96.00    0.66   100.00    0.50    99.00    0.60
vstanh     F  97.00    1.51   100.00    0.50    94.00    0.73
vtan       D 100.00    0.50    67.00    1.91    56.00    2.28
vtanh      F  97.00    1.73    90.00    1.50    58.00    2.64

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,101
 I      0,10

Original Publication Date

07 April 2005

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

Document Information

Modified date:
17 June 2018

UID

swg27006978