13 #if defined(LIBM_SCCS) && !defined(lint)
14 static char rcsid[] =
"$NetBSD: e_pow.c,v 1.9 1995/05/12 04:57:32 jtc Exp $";
73 0.0, 5.84962487220764160156e-01,},
76 0.0, 1.35003920212974897128e-08,},
81 L1 = 5.99999999999994648725e-01,
82 L2 = 4.28571428578550184252e-01,
83 L3 = 3.33333329818377432918e-01,
84 L4 = 2.72728123808534006489e-01,
85 L5 = 2.30660745775561754067e-01,
86 L6 = 2.06975017800338417784e-01,
87 P1 = 1.66666666666666019037e-01,
88 P2 = -2.77777777770155933842e-03,
89 P3 = 6.61375632143793436117e-05,
90 P4 = -1.65339022054652515390e-06,
91 P5 = 4.13813679705723846039e-08,
92 lg2 = 6.93147180559945286227e-01,
93 lg2_h = 6.93147182464599609375e-01,
94 lg2_l = -1.90465429995776804525e-09,
95 ovt = 8.0085662595372944372e-0017,
96 cp = 9.61796693925975554329e-01,
97 cp_h = 9.61796700954437255859e-01,
98 cp_l = -7.02846165095275826516e-09,
99 ivln2 = 1.44269504088896338700e+00,
110 double z, ax, z_h, z_l, p_h, p_l;
118 ix = hx & 0x7fffffff;
119 iy = hy & 0x7fffffff;
126 if (ix > 0x7ff00000 || ((ix == 0x7ff00000) && (lx != 0)) ||
127 iy > 0x7ff00000 || ((iy == 0x7ff00000) && (ly != 0)))
137 if (iy >= 0x43400000)
139 else if (iy >= 0x3ff00000) {
140 k = (iy >> 20) - 0x3ff;
143 if ((j << (52 - k)) == ly)
144 yisint = 2 - (j & 1);
145 }
else if (ly == 0) {
147 if ((j << (20 - k)) == iy)
148 yisint = 2 - (j & 1);
155 if (iy == 0x7ff00000) {
156 if (((ix - 0x3ff00000) |
lx) == 0)
158 else if (ix >= 0x3ff00000)
159 return (hy >= 0) ? y :
zero;
161 return (hy < 0) ? -y :
zero;
163 if (iy == 0x3ff00000) {
169 if (hy == 0x40000000)
171 if (hy == 0x3fe00000) {
180 if (ix == 0x7ff00000 || ix == 0 || ix == 0x3ff00000) {
185 if (((ix - 0x3ff00000) | yisint) == 0) {
186 z = (z -
z) / (z - z);
187 }
else if (yisint == 1)
195 if (((((
u_int32_t) hx >> 31) - 1) | yisint) == 0)
196 return (x - x) / (x -
x);
199 if (iy > 0x41e00000) {
200 if (iy > 0x43f00000) {
201 if (ix <= 0x3fefffff)
203 if (ix >= 0x3ff00000)
214 w = (t *
t) * (0.5 - t * (0.3333333333333333333333 - t * 0.25));
221 double s2, s_h, s_l, t_h, t_l;
224 if (ix < 0x00100000) {
229 n += ((
ix) >> 20) - 0x3ff;
235 else if (j < 0xBB67A)
246 v =
one / (ax + bp[
k]);
253 ((ix >> 1) | 0x20000000) + 0x00080000 + (k << 18));
254 t_l = ax - (t_h - bp[
k]);
255 s_l = v * ((u - s_h * t_h) - s_h * t_l);
261 s2 * (
L4 + s2 * (
L5 + s2 *
L6)))));
262 r += s_l * (s_h +
s);
266 t_l = r - ((t_h - 3.0) - s2);
269 v = s_l * t_h + t_l *
s;
278 t1 = (((z_h + z_l) +
dp_h[k]) +
t);
280 t2 = z_l - (((t1 -
t) -
dp_h[k]) - z_h);
284 if (((((
u_int32_t) hx >> 31) - 1) | (yisint - 1)) == 0)
290 p_l = (y -
y1) * t1 + y * t2;
294 if (j >= 0x40900000) {
295 if (((j - 0x40900000) | i) != 0)
298 if (p_l +
ovt > z - p_h)
301 }
else if ((j & 0x7fffffff) >= 0x4090cc00) {
302 if (((j - 0xc090cc00) | i) != 0)
306 return s * tiny *
tiny;
313 k = (i >> 20) - 0x3ff;
315 if (i > 0x3fe00000) {
316 n = j + (0x00100000 >> (k + 1));
317 k = ((n & 0x7fffffff) >> 20) - 0x3ff;
320 n = ((n & 0x000fffff) | 0x00100000) >> (20 -
k);
328 v = (p_l - (t - p_h)) *
lg2 + t *
lg2_l;
332 t1 = z - t * (
P1 + t * (
P2 + t * (
P3 + t * (
P4 + t *
P5))));
333 r = (z *
t1) / (t1 -
two) - (w + z *
w);
#define GET_HIGH_WORD(i, d)
GLuint GLfloat GLfloat GLfloat GLfloat y1
#define SET_HIGH_WORD(d, v)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
#define EXTRACT_WORDS(ix0, ix1, d)
EGLSurface EGLint EGLint y
#define libm_hidden_proto(x)
GLdouble GLdouble GLdouble r
GLint GLint GLint GLint z
GLint GLint GLint GLint GLint w
double scalbn(double x, int n)