=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/include/math.h,v retrieving revision 1.20 retrieving revision 1.21 diff -c -r1.20 -r1.21 *** src/include/math.h 2008/07/24 09:41:58 1.20 --- src/include/math.h 2008/09/07 20:36:07 1.21 *************** *** 1,4 **** ! /* $OpenBSD: math.h,v 1.20 2008/07/24 09:41:58 martynas Exp $ */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. --- 1,4 ---- ! /* $OpenBSD: math.h,v 1.21 2008/09/07 20:36:07 martynas Exp $ */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. *************** *** 63,80 **** : (sizeof (x) == sizeof (double)) ? \ __isfinite(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) \ ((sizeof (x) == sizeof (float)) ? \ __isnormalf(x) \ --- 63,68 ---- *************** *** 97,102 **** --- 85,103 ---- #define isunordered(x, y) (isnan(x) || isnan(y)) #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 */ *************** *** 125,175 **** #endif /* __BSD_VISIBLE || __XPG_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 - - /* - * set X_TLOSS = pi*2**52, which is possibly defined in - * (one may replace the following line by "#include ") - */ - - #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 */ __BEGIN_DECLS --- 126,132 ---- *************** *** 215,223 **** extern double expm1(double); extern int ilogb(double); extern double log1p(double); - #if 0 extern double log2(double); - #endif extern double logb(double); extern double scalbn(double, int); #if 0 --- 172,178 ---- *************** *** 253,263 **** extern double nexttoward(double, long double); #endif - #if 0 extern double fdim(double, double); extern double fmax(double, double); extern double fmin(double, double); - #endif #if 0 extern double fma(double, double, double); --- 208,216 ---- *************** *** 292,301 **** extern double gamma_r(double, int *); extern double lgamma_r(double, int *); - #ifdef __LIBM_PRIVATE - extern int matherr(struct exception *); - #endif /* __LIBM_PRIVATE */ - /* * IEEE Test Vector */ --- 245,250 ---- *************** *** 375,385 **** extern float nexttowardf(float, long double); #endif - #if 0 extern float fdimf(float, float); extern float fmaxf(float, float); extern float fminf(float, float); - #endif #if 0 extern float fmaf(float, float, float); --- 324,332 ----