e_expf.c (176451) | e_expf.c (218508) |
---|---|
1/* e_expf.c -- float version of e_exp.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#include <sys/cdefs.h> | 1/* e_expf.c -- float version of e_exp.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#include <sys/cdefs.h> |
17__FBSDID("$FreeBSD: head/lib/msun/src/e_expf.c 176451 2008-02-22 02:30:36Z das $"); | 17__FBSDID("$FreeBSD: head/lib/msun/src/e_expf.c 218508 2011-02-10 07:37:29Z das $"); |
18 19#include "math.h" 20#include "math_private.h" 21 22static const float 23one = 1.0, 24halF[2] = {0.5,-0.5,}, 25huge = 1.0e+30, --- 41 unchanged lines hidden (view full) --- 67 } else { 68 k = invln2*x+halF[xsb]; 69 t = k; 70 hi = x - t*ln2HI[0]; /* t*ln2HI is exact here */ 71 lo = t*ln2LO[0]; 72 } 73 x = hi - lo; 74 } | 18 19#include "math.h" 20#include "math_private.h" 21 22static const float 23one = 1.0, 24halF[2] = {0.5,-0.5,}, 25huge = 1.0e+30, --- 41 unchanged lines hidden (view full) --- 67 } else { 68 k = invln2*x+halF[xsb]; 69 t = k; 70 hi = x - t*ln2HI[0]; /* t*ln2HI is exact here */ 71 lo = t*ln2LO[0]; 72 } 73 x = hi - lo; 74 } |
75 else if(hx < 0x31800000) { /* when |x|<2**-28 */ | 75 else if(hx < 0x39000000) { /* when |x|<2**-14 */ |
76 if(huge+x>one) return one+x;/* trigger inexact */ 77 } 78 else k = 0; 79 80 /* x is now in primary range */ 81 t = x*x; 82 if(k >= -125) 83 SET_FLOAT_WORD(twopk,0x3f800000+(k<<23)); --- 12 unchanged lines hidden --- | 76 if(huge+x>one) return one+x;/* trigger inexact */ 77 } 78 else k = 0; 79 80 /* x is now in primary range */ 81 t = x*x; 82 if(k >= -125) 83 SET_FLOAT_WORD(twopk,0x3f800000+(k<<23)); --- 12 unchanged lines hidden --- |