1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #if defined(LIBM_SCCS) && !defined(lint)
- static char rcsid[] = "$NetBSD: w_exp.c,v 1.6 1995/05/10 20:48:51 jtc Exp $";
- #endif
- #include "math.h"
- #include "math_private.h"
- #ifdef __STDC__
- static const double
- #else
- static double
- #endif
- o_threshold= 7.09782712893383973096e+02,
- u_threshold= -7.45133219101941108420e+02;
- #ifdef __STDC__
- double exp(double x)
- #else
- double exp(x)
- double x;
- #endif
- {
- #ifdef _IEEE_LIBM
- return __ieee754_exp(x);
- #else
- double z;
- z = __ieee754_exp(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(finite(x)) {
- if(x>o_threshold)
- return __kernel_standard(x,x,6);
- else if(x<u_threshold)
- return __kernel_standard(x,x,7);
- }
- return z;
- #endif
- }
|