Go to the source code of this file.
|
static const double | one = 1.0 |
|
static const double | huge = 1.0e+300 |
|
static const double | tiny = 1.0e-300 |
|
static const double | o_threshold = 7.09782712893383973096e+02 |
|
static const double | ln2_hi = 6.93147180369123816490e-01 |
|
static const double | ln2_lo = 1.90821492927058770002e-10 |
|
static const double | invln2 = 1.44269504088896338700e+00 |
|
static const double | Q1 = -3.33333333333331316428e-02 |
|
static const double | Q2 = 1.58730158725481460165e-03 |
|
static const double | Q3 = -7.93650757867487942473e-05 |
|
static const double | Q4 = 4.00821782732936239552e-06 |
|
static const double | Q5 = -2.01099218183624371326e-07 |
|
◆ expm1()
Definition at line 153 of file expm1.c.
References huge, invln2, ln2_hi, ln2_lo, o_threshold, one, Q1, Q2, Q3, Q4, Q5, and tiny.
Referenced by cosh(), sinh(), and tanh().
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.
◆ huge
const double huge = 1.0e+300 |
|
static |
◆ invln2
const double invln2 = 1.44269504088896338700e+00 |
|
static |
◆ ln2_hi
const double ln2_hi = 6.93147180369123816490e-01 |
|
static |
◆ ln2_lo
const double ln2_lo = 1.90821492927058770002e-10 |
|
static |
◆ o_threshold
const double o_threshold = 7.09782712893383973096e+02 |
|
static |
◆ one
◆ Q1
const double Q1 = -3.33333333333331316428e-02 |
|
static |
◆ Q2
const double Q2 = 1.58730158725481460165e-03 |
|
static |
◆ Q3
const double Q3 = -7.93650757867487942473e-05 |
|
static |
◆ Q4
const double Q4 = 4.00821782732936239552e-06 |
|
static |
◆ Q5
const double Q5 = -2.01099218183624371326e-07 |
|
static |
◆ tiny
const double tiny = 1.0e-300 |
|
static |