diff options
author | stefanf <stefanf@FreeBSD.org> | 2004-06-19 09:25:21 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2004-06-19 09:25:21 +0000 |
commit | 127bbb4fe3f68ad22d400dd4d7dcf14f9104bc81 (patch) | |
tree | 4ac14c3282225003619070aaed6bd5aa427ad89e /lib/msun | |
parent | 07d9a77b87b22ee1b68f3a0dd2b811fb3062fc00 (diff) | |
download | FreeBSD-src-127bbb4fe3f68ad22d400dd4d7dcf14f9104bc81.zip FreeBSD-src-127bbb4fe3f68ad22d400dd4d7dcf14f9104bc81.tar.gz |
Our MI implementation of ilogb() returns -INT_MAX for the argument 0.0 rather
than INT_MIN, so adjust FP_ILOGB0 to reflect this. Use <machine/_limits.h> for
INT_MAX's value while there.
Reviewed by: standards@
Diffstat (limited to 'lib/msun')
-rw-r--r-- | lib/msun/src/math.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index 01c29af..ac0f2ee 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -19,6 +19,7 @@ #include <sys/cdefs.h> #include <sys/_types.h> +#include <machine/_limits.h> /* * ANSI/POSIX @@ -36,8 +37,8 @@ extern const union __nan_un { #define HUGE_VAL (__infinity.__ud) #if __ISO_C_VISIBLE >= 1999 -#define FP_ILOGB0 (-0x7fffffff - 1) /* INT_MIN */ -#define FP_ILOGBNAN 0x7fffffff /* INT_MAX */ +#define FP_ILOGB0 (-__INT_MAX) +#define FP_ILOGBNAN __INT_MAX #define HUGE_VALF (float)HUGE_VAL #define HUGE_VALL (long double)HUGE_VAL #define INFINITY HUGE_VALF |