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@
This commit is contained in:
Stefan Farfeleder 2004-06-19 09:25:21 +00:00
parent fc6c63b477
commit 83bc89312c

View File

@ -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