00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
#if defined(LIBM_SCCS) && !defined(lint)
00014
static char rcsid[] =
"$NetBSD: w_exp.c,v 1.6 1995/05/10 20:48:51 jtc Exp $";
00015
#endif
00016
00017
00018
00019
00020
00021
#include "math.h"
00022
#include "mathP.h"
00023
00024
#ifdef __STDC__
00025
static const double
00026
#else
00027
static double
00028
#endif
00029 o_threshold= 7.09782712893383973096e+02,
00030 u_threshold= -7.45133219101941108420e+02;
00031
00032
#ifdef __STDC__
00033
double exp(
double x)
00034 #
else
00035 double exp(x)
00036 double x;
00037 #endif
00038 {
00039
#ifdef _IEEE_LIBM
00040
return __ieee754_exp(x);
00041
#else
00042
double z;
00043 z =
__ieee754_exp(x);
00044
if(
_LIB_VERSION == _IEEE_)
return z;
00045
if(
finite(x)) {
00046
if(x>
o_threshold)
00047
return __kernel_standard(x,x,6);
00048
else if(x<u_threshold)
00049
return __kernel_standard(x,x,7);
00050 }
00051
return z;
00052
#endif
00053
}