version 1.20, 2008/07/24 09:41:58 |
version 1.21, 2008/09/07 20:36:07 |
|
|
: (sizeof (x) == sizeof (double)) ? \ |
: (sizeof (x) == sizeof (double)) ? \ |
__isfinite(x) \ |
__isfinite(x) \ |
: __isfinitel(x)) |
: __isfinitel(x)) |
#define isinf(x) \ |
|
((sizeof (x) == sizeof (float)) ? \ |
|
isinff(x) \ |
|
: (sizeof (x) == sizeof (double)) ? \ |
|
__isinf(x) \ |
|
: __isinfl(x)) |
|
#define isnan(x) \ |
|
((sizeof (x) == sizeof (float)) ? \ |
|
isnanf(x) \ |
|
: (sizeof (x) == sizeof (double)) ? \ |
|
__isnan(x) \ |
|
: __isnanl(x)) |
|
#define isnormal(x) \ |
#define isnormal(x) \ |
((sizeof (x) == sizeof (float)) ? \ |
((sizeof (x) == sizeof (float)) ? \ |
__isnormalf(x) \ |
__isnormalf(x) \ |
|
|
#define isunordered(x, y) (isnan(x) || isnan(y)) |
#define isunordered(x, y) (isnan(x) || isnan(y)) |
#endif /* __ISO_C_VISIBLE >= 1999 */ |
#endif /* __ISO_C_VISIBLE >= 1999 */ |
|
|
|
#define isinf(x) \ |
|
((sizeof (x) == sizeof (float)) ? \ |
|
isinff(x) \ |
|
: (sizeof (x) == sizeof (double)) ? \ |
|
__isinf(x) \ |
|
: __isinfl(x)) |
|
#define isnan(x) \ |
|
((sizeof (x) == sizeof (float)) ? \ |
|
isnanf(x) \ |
|
: (sizeof (x) == sizeof (double)) ? \ |
|
__isnan(x) \ |
|
: __isnanl(x)) |
|
|
/* |
/* |
* XOPEN/SVID |
* XOPEN/SVID |
*/ |
*/ |
|
|
#endif /* __BSD_VISIBLE || __XPG_VISIBLE */ |
#endif /* __BSD_VISIBLE || __XPG_VISIBLE */ |
|
|
#if __BSD_VISIBLE |
#if __BSD_VISIBLE |
enum fdversion {fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix}; |
|
|
|
#define _LIB_VERSION_TYPE enum fdversion |
|
#define _LIB_VERSION _fdlib_version |
|
|
|
/* if global variable _LIB_VERSION is not desirable, one may |
|
* change the following to be a constant by: |
|
* #define _LIB_VERSION_TYPE const enum version |
|
* In that case, after one initializes the value _LIB_VERSION (see |
|
* s_lib_version.c) during compile time, it cannot be modified |
|
* in the middle of a program |
|
*/ |
|
extern _LIB_VERSION_TYPE _LIB_VERSION; |
|
|
|
#define _IEEE_ fdlibm_ieee |
|
#define _SVID_ fdlibm_svid |
|
#define _XOPEN_ fdlibm_xopen |
|
#define _POSIX_ fdlibm_posix |
|
|
|
#ifndef __cplusplus |
|
struct exception { |
|
int type; |
|
char *name; |
|
double arg1; |
|
double arg2; |
|
double retval; |
|
}; |
|
#endif /* !__cplusplus */ |
|
|
|
#define HUGE MAXFLOAT |
#define HUGE MAXFLOAT |
|
|
/* |
|
* set X_TLOSS = pi*2**52, which is possibly defined in <values.h> |
|
* (one may replace the following line by "#include <values.h>") |
|
*/ |
|
|
|
#define X_TLOSS 1.41484755040568800000e+16 |
|
|
|
#define DOMAIN 1 |
|
#define SING 2 |
|
#define OVERFLOW 3 |
|
#define UNDERFLOW 4 |
|
#define TLOSS 5 |
|
#define PLOSS 6 |
|
|
|
#endif /* __BSD_VISIBLE */ |
#endif /* __BSD_VISIBLE */ |
|
|
__BEGIN_DECLS |
__BEGIN_DECLS |
|
|
extern double expm1(double); |
extern double expm1(double); |
extern int ilogb(double); |
extern int ilogb(double); |
extern double log1p(double); |
extern double log1p(double); |
#if 0 |
|
extern double log2(double); |
extern double log2(double); |
#endif |
|
extern double logb(double); |
extern double logb(double); |
extern double scalbn(double, int); |
extern double scalbn(double, int); |
#if 0 |
#if 0 |
|
|
extern double nexttoward(double, long double); |
extern double nexttoward(double, long double); |
#endif |
#endif |
|
|
#if 0 |
|
extern double fdim(double, double); |
extern double fdim(double, double); |
extern double fmax(double, double); |
extern double fmax(double, double); |
extern double fmin(double, double); |
extern double fmin(double, double); |
#endif |
|
|
|
#if 0 |
#if 0 |
extern double fma(double, double, double); |
extern double fma(double, double, double); |
|
|
extern double gamma_r(double, int *); |
extern double gamma_r(double, int *); |
extern double lgamma_r(double, int *); |
extern double lgamma_r(double, int *); |
|
|
#ifdef __LIBM_PRIVATE |
|
extern int matherr(struct exception *); |
|
#endif /* __LIBM_PRIVATE */ |
|
|
|
/* |
/* |
* IEEE Test Vector |
* IEEE Test Vector |
*/ |
*/ |
|
|
extern float nexttowardf(float, long double); |
extern float nexttowardf(float, long double); |
#endif |
#endif |
|
|
#if 0 |
|
extern float fdimf(float, float); |
extern float fdimf(float, float); |
extern float fmaxf(float, float); |
extern float fmaxf(float, float); |
extern float fminf(float, float); |
extern float fminf(float, float); |
#endif |
|
|
|
#if 0 |
#if 0 |
extern float fmaf(float, float, float); |
extern float fmaf(float, float, float); |