Print this page
5261 libm should stop using synonyms.h
5298 fabs is 0-sized, confuses dis(1) and others
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Approved by: Gordon Ross <gwr@nexenta.com>


  50  *      expl(-INF)=  0;
  51  *      for finite argument, only expl(0)=1 is exact.
  52  *
  53  * Accuracy:
  54  *      according to an error analysis, the error is always less than
  55  *      an ulp (unit in the last place).
  56  *
  57  * Misc. info.
  58  *      For 113 bit long double
  59  *              if x >  1.135652340629414394949193107797076342845e+4
  60  *      then expl(x) overflow;
  61  *              if x < -1.143346274333629787883724384345262150341e+4
  62  *      then expl(x) underflow
  63  *
  64  * Constants:
  65  * Only decimal values are given. We assume that the compiler will convert
  66  * from decimal to binary accurately enough to produce the correct
  67  * hexadecimal values.
  68  */
  69 
  70 #pragma weak expl = __expl
  71 
  72 #include "libm.h"
  73 
  74 extern const long double _TBL_expl_hi[], _TBL_expl_lo[];
  75 
  76 static const long double
  77 one             =  1.0L,
  78 two             =  2.0L,
  79 ln2_64          =  1.083042469624914545964425189778400898568e-2L,
  80 ovflthreshold   =  1.135652340629414394949193107797076342845e+4L,
  81 unflthreshold   = -1.143346274333629787883724384345262150341e+4L,
  82 invln2_32       =  4.616624130844682903551758979206054839765e+1L,
  83 ln2_32hi        =  2.166084939249829091928849858592451515688e-2L,
  84 ln2_32lo        =  5.209643502595475652782654157501186731779e-27L;
  85 
  86 /* rational approximation coeffs for [-(ln2)/64,(ln2)/64] */
  87 static const long double
  88 t1 =   1.666666666666666666666666666660876387437e-1L,
  89 t2 =  -2.777777777777777777777707812093173478756e-3L,
  90 t3 =   6.613756613756613482074280932874221202424e-5L,




  50  *      expl(-INF)=  0;
  51  *      for finite argument, only expl(0)=1 is exact.
  52  *
  53  * Accuracy:
  54  *      according to an error analysis, the error is always less than
  55  *      an ulp (unit in the last place).
  56  *
  57  * Misc. info.
  58  *      For 113 bit long double
  59  *              if x >  1.135652340629414394949193107797076342845e+4
  60  *      then expl(x) overflow;
  61  *              if x < -1.143346274333629787883724384345262150341e+4
  62  *      then expl(x) underflow
  63  *
  64  * Constants:
  65  * Only decimal values are given. We assume that the compiler will convert
  66  * from decimal to binary accurately enough to produce the correct
  67  * hexadecimal values.
  68  */
  69 
  70 #pragma weak __expl = expl
  71 
  72 #include "libm.h"
  73 
  74 extern const long double _TBL_expl_hi[], _TBL_expl_lo[];
  75 
  76 static const long double
  77 one             =  1.0L,
  78 two             =  2.0L,
  79 ln2_64          =  1.083042469624914545964425189778400898568e-2L,
  80 ovflthreshold   =  1.135652340629414394949193107797076342845e+4L,
  81 unflthreshold   = -1.143346274333629787883724384345262150341e+4L,
  82 invln2_32       =  4.616624130844682903551758979206054839765e+1L,
  83 ln2_32hi        =  2.166084939249829091928849858592451515688e-2L,
  84 ln2_32lo        =  5.209643502595475652782654157501186731779e-27L;
  85 
  86 /* rational approximation coeffs for [-(ln2)/64,(ln2)/64] */
  87 static const long double
  88 t1 =   1.666666666666666666666666666660876387437e-1L,
  89 t2 =  -2.777777777777777777777707812093173478756e-3L,
  90 t3 =   6.613756613756613482074280932874221202424e-5L,