e_expf.c (8870) | e_expf.c (17141) |
---|---|
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#ifndef lint | 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#ifndef lint |
17static char rcsid[] = "$Id: e_expf.c,v 1.1.1.1 1994/08/19 09:39:54 jkh Exp $"; | 17static char rcsid[] = "$Id: e_expf.c,v 1.2 1995/05/30 05:48:09 rgrimes Exp $"; |
18#endif 19 20#include "math.h" 21#include "math_private.h" 22 23#ifdef __STDC__ 24static const float 25#else --- 18 unchanged lines hidden (view full) --- 44 45#ifdef __STDC__ 46 float __ieee754_expf(float x) /* default IEEE double exp */ 47#else 48 float __ieee754_expf(x) /* default IEEE double exp */ 49 float x; 50#endif 51{ | 18#endif 19 20#include "math.h" 21#include "math_private.h" 22 23#ifdef __STDC__ 24static const float 25#else --- 18 unchanged lines hidden (view full) --- 44 45#ifdef __STDC__ 46 float __ieee754_expf(float x) /* default IEEE double exp */ 47#else 48 float __ieee754_expf(x) /* default IEEE double exp */ 49 float x; 50#endif 51{ |
52 float y,hi,lo,c,t; 53 int32_t k,xsb; | 52 float y,hi=0.0,lo=0.0,c,t; 53 int32_t k=0,xsb; |
54 u_int32_t hx; 55 56 GET_FLOAT_WORD(hx,x); 57 xsb = (hx>>31)&1; /* sign bit of x */ 58 hx &= 0x7fffffff; /* high word of |x| */ 59 60 /* filter out non-finite argument */ 61 if(hx >= 0x42b17218) { /* if |x|>=88.721... */ --- 42 unchanged lines hidden --- | 54 u_int32_t hx; 55 56 GET_FLOAT_WORD(hx,x); 57 xsb = (hx>>31)&1; /* sign bit of x */ 58 hx &= 0x7fffffff; /* high word of |x| */ 59 60 /* filter out non-finite argument */ 61 if(hx >= 0x42b17218) { /* if |x|>=88.721... */ --- 42 unchanged lines hidden --- |