62 #ifdef POK_NEEDS_LIBMATH
64 #include "math_private.h"
67 two54 = 1.80143985094819840000e+16,
68 ivln10 = 4.34294481903251816668e-01,
69 log10_2hi = 3.01029995663611771306e-01,
70 log10_2lo = 3.69423907715893078616e-13;
72 static const double zero = 0.0;
75 __ieee754_log10(
double x)
81 EXTRACT_WORDS(hx,lx,x);
84 if (hx < 0x00100000) {
85 if (((hx&0x7fffffff)|lx)==0)
87 if (hx<0)
return (x-x)/zero;
91 if (hx >= 0x7ff00000)
return x+x;
93 i = ((uint32_t)k&0x80000000)>>31;
94 hx = (hx&0x000fffff)|((0x3ff-i)<<20);
97 z = y*log10_2lo + ivln10*__ieee754_log(x);