Deleted Added
full compact
e_powf.c (97413) e_powf.c (98349)
1/* e_powf.c -- float version of e_pow.c.
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 *
9 * Developed at SunPro, a Sun Microsystems, Inc. business.
10 * Permission to use, copy, modify, and distribute this
11 * software is freely granted, provided that this notice
12 * is preserved.
13 * ====================================================
14 */
15
16#ifndef lint
1/* e_powf.c -- float version of e_pow.c.
2 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
3 */
4
5/*
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8 *
9 * Developed at SunPro, a Sun Microsystems, Inc. business.
10 * Permission to use, copy, modify, and distribute this
11 * software is freely granted, provided that this notice
12 * is preserved.
13 * ====================================================
14 */
15
16#ifndef lint
17static char rcsid[] = "$FreeBSD: head/lib/msun/src/e_powf.c 97413 2002-05-28 18:15:04Z alfred $";
17static char rcsid[] = "$FreeBSD: head/lib/msun/src/e_powf.c 98349 2002-06-17 15:28:59Z bde $";
18#endif
19
20#include "math.h"
21#include "math_private.h"
22
23static const float
24bp[] = {1.0, 1.5,},
25dp_h[] = { 0.0, 5.84960938e-01,}, /* 0x3f15c000 */

--- 99 unchanged lines hidden (view full) ---

125
126 /* |y| is huge */
127 if(iy>0x4d000000) { /* if |y| > 2**27 */
128 /* over/underflow if x is not close to one */
129 if(ix<0x3f7ffff8) return (hy<0)? huge*huge:tiny*tiny;
130 if(ix>0x3f800007) return (hy>0)? huge*huge:tiny*tiny;
131 /* now |1-x| is tiny <= 2**-20, suffice to compute
132 log(x) by x-x^2/2+x^3/3-x^4/4 */
18#endif
19
20#include "math.h"
21#include "math_private.h"
22
23static const float
24bp[] = {1.0, 1.5,},
25dp_h[] = { 0.0, 5.84960938e-01,}, /* 0x3f15c000 */

--- 99 unchanged lines hidden (view full) ---

125
126 /* |y| is huge */
127 if(iy>0x4d000000) { /* if |y| > 2**27 */
128 /* over/underflow if x is not close to one */
129 if(ix<0x3f7ffff8) return (hy<0)? huge*huge:tiny*tiny;
130 if(ix>0x3f800007) return (hy>0)? huge*huge:tiny*tiny;
131 /* now |1-x| is tiny <= 2**-20, suffice to compute
132 log(x) by x-x^2/2+x^3/3-x^4/4 */
133 t = x-1; /* t has 20 trailing zeros */
133 t = ax-1; /* t has 20 trailing zeros */
134 w = (t*t)*((float)0.5-t*((float)0.333333333333-t*(float)0.25));
135 u = ivln2_h*t; /* ivln2_h has 16 sig. bits */
136 v = t*ivln2_l-w*ivln2;
137 t1 = u+v;
138 GET_FLOAT_WORD(is,t1);
139 SET_FLOAT_WORD(t1,is&0xfffff000);
140 t2 = v-(t1-u);
141 } else {

--- 104 unchanged lines hidden ---
134 w = (t*t)*((float)0.5-t*((float)0.333333333333-t*(float)0.25));
135 u = ivln2_h*t; /* ivln2_h has 16 sig. bits */
136 v = t*ivln2_l-w*ivln2;
137 t1 = u+v;
138 GET_FLOAT_WORD(is,t1);
139 SET_FLOAT_WORD(t1,is&0xfffff000);
140 t2 = v-(t1-u);
141 } else {

--- 104 unchanged lines hidden ---