math.h: Change definition of FP_ILOGB0 to match the specification.

See #18351 for details on the specifications.

This is the same thing NetBSD does. BeOS R5 defined these values
differently than we did even before this commit, and it does not
seem to have caused problems then, so this should be fine.

While technically an ABI break, in practice these values are not
always differentiated on other platforms, and it appears musl's
code triggers divide-by-zero exceptions on purpose before it
returns this value, anyway.

Fixes #18351.
This commit is contained in:
Augustin Cavalier 2023-04-08 12:29:19 -04:00
parent 0f67b2ac2e
commit fcd82d3dc3

View File

@ -94,7 +94,7 @@
#define FP_FAST_FMAL 0
#endif
#define FP_ILOGB0 INT_MAX
#define FP_ILOGB0 INT_MIN
#define FP_ILOGBNAN INT_MAX
#ifdef __cplusplus