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>


  92  *                      ( (n*ln2_lo+_TBL_logl_lo[j]) + s*(A1+...) )
  93  *
  94  * Note.
  95  *      For ln2_hi and _TBL_logl_hi[j], we force their last 32 bit to be zero
  96  *      so that n*ln2_hi + _TBL_logl_hi[j] is exact. Here
  97  *      _TBL_logl_hi[j] + _TBL_logl_lo[j] match log(1+j*2**-6) to 194 bits
  98  *
  99  *
 100  * Special cases:
 101  *      log(x) is NaN with signal if x < 0 (including -INF) ;
 102  *      log(+INF) is +INF; log(0) is -INF with signal;
 103  *      log(NaN) is that NaN with no signal.
 104  *
 105  * Constants:
 106  * The hexadecimal values are the intended ones for the following constants.
 107  * The decimal values may be used, provided that the compiler will convert
 108  * from decimal to binary accurately enough to produce the hexadecimal values
 109  * shown.
 110  */
 111 
 112 #pragma weak log1pl = __log1pl
 113 
 114 #include "libm.h"
 115 
 116 extern const long double _TBL_logl_hi[], _TBL_logl_lo[];
 117 
 118 static const long double
 119 zero    =   0.0L,
 120 one     =   1.0L,
 121 two     =   2.0L,
 122 ln2hi   =   6.931471805599453094172319547495844850203e-0001L,
 123 ln2lo   =   1.667085920830552208890449330400379754169e-0025L,
 124 A1      =   2.000000000000000000000000000000000000024e+0000L,
 125 A2      =   6.666666666666666666666666666666091393804e-0001L,
 126 A3      =   4.000000000000000000000000407167070220671e-0001L,
 127 A4      =   2.857142857142857142730077490612903681164e-0001L,
 128 A5      =   2.222222222222242577702836920812882605099e-0001L,
 129 A6      =   1.818181816435493395985912667105885828356e-0001L,
 130 A7      =   1.538537835211839751112067512805496931725e-0001L,
 131 B1      =   6.666666666666666666666666666666961498329e-0001L,
 132 B2      =   3.999999999999999999999999990037655042358e-0001L,




  92  *                      ( (n*ln2_lo+_TBL_logl_lo[j]) + s*(A1+...) )
  93  *
  94  * Note.
  95  *      For ln2_hi and _TBL_logl_hi[j], we force their last 32 bit to be zero
  96  *      so that n*ln2_hi + _TBL_logl_hi[j] is exact. Here
  97  *      _TBL_logl_hi[j] + _TBL_logl_lo[j] match log(1+j*2**-6) to 194 bits
  98  *
  99  *
 100  * Special cases:
 101  *      log(x) is NaN with signal if x < 0 (including -INF) ;
 102  *      log(+INF) is +INF; log(0) is -INF with signal;
 103  *      log(NaN) is that NaN with no signal.
 104  *
 105  * Constants:
 106  * The hexadecimal values are the intended ones for the following constants.
 107  * The decimal values may be used, provided that the compiler will convert
 108  * from decimal to binary accurately enough to produce the hexadecimal values
 109  * shown.
 110  */
 111 
 112 #pragma weak __log1pl = log1pl
 113 
 114 #include "libm.h"
 115 
 116 extern const long double _TBL_logl_hi[], _TBL_logl_lo[];
 117 
 118 static const long double
 119 zero    =   0.0L,
 120 one     =   1.0L,
 121 two     =   2.0L,
 122 ln2hi   =   6.931471805599453094172319547495844850203e-0001L,
 123 ln2lo   =   1.667085920830552208890449330400379754169e-0025L,
 124 A1      =   2.000000000000000000000000000000000000024e+0000L,
 125 A2      =   6.666666666666666666666666666666091393804e-0001L,
 126 A3      =   4.000000000000000000000000407167070220671e-0001L,
 127 A4      =   2.857142857142857142730077490612903681164e-0001L,
 128 A5      =   2.222222222222242577702836920812882605099e-0001L,
 129 A6      =   1.818181816435493395985912667105885828356e-0001L,
 130 A7      =   1.538537835211839751112067512805496931725e-0001L,
 131 B1      =   6.666666666666666666666666666666961498329e-0001L,
 132 B2      =   3.999999999999999999999999990037655042358e-0001L,