147 Q1 = -3.33333333333331316428e-02,
148 Q2 = 1.58730158725481460165e-03,
149 Q3 = -7.93650757867487942473e-05,
150 Q4 = 4.00821782732936239552e-06,
151 Q5 = -2.01099218183624371326e-07;
155 double y, hi, lo, c, t, e, hxs, hfx, r1;
162 xsb = hx & 0x80000000;
166 if (hx >= 0x4043687A)
168 if (hx >= 0x40862E42)
170 if (hx >= 0x7ff00000)
174 if (((hx & 0xfffff) | low) != 0)
177 return (xsb == 0) ? x : -1.0;
209 k = (int32_t)(
invln2 * x + ((xsb == 0) ? 0.5 : -0.5));
217 else if (hx < 0x3c900000)
220 return x - (t - (
huge + x));
228 r1 =
one + hxs * (
Q1 + hxs * (
Q2 + hxs * (
Q3 + hxs * (
Q4 + hxs *
Q5))));
230 e = hxs * ((r1 - t) / (6.0 - x * t));
232 return x - (x * e - hxs);
235 e = (x * (e - c) - c);
238 return 0.5 * (x - e) - 0.5;
242 return -2.0 * (e - (x + 0.5));
244 return one + 2.0 * (x - e);
246 if (k <= -2 || k > 56)
#define GET_HIGH_WORD(i, d)
Get the more significant 32 bit int from a double.
#define GET_LOW_WORD(i, d)
Get the less significant 32 bit int from a double.
static const double o_threshold
static const double ln2_hi
static const double invln2
static const double ln2_lo
#define SET_HIGH_WORD(d, v)
Set the more significant 32 bits of a double from an int.