]> Savannah Git Hosting - gnulib.git/commit
math: Fix INFINITY and NAN on FreeBSD and AIX.
authorBruno Haible <bruno@clisp.org>
Thu, 1 Aug 2024 14:41:23 +0000 (16:41 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 1 Aug 2024 14:41:23 +0000 (16:41 +0200)
commit0f585472410e6dc60b4a9be7929b45641b991415
treea2bddb33ceea96f66f08575d4edf409ddde91a41
parent34bd9be12b748f81ed0b568673e82a286a4f1c6f
math: Fix INFINITY and NAN on FreeBSD and AIX.

* doc/posix-headers/math.texi: Mention some FreeBSD and AIX bugs.
* lib/math.in.h (INFINITY): New macro.
(NAN): Replace also on FreeBSD < 8 and AIX. Use __builtin_nanf where
available.
(HUGE_VALF): Replace also on FreeBSD < 6. Use __builtin_inff where
available.
(HUGE_VAL): Replace also on FreeBSD < 6. Use __builtin_inf where
available.
(HUGE_VALL): Replace also on FreeBSD < 6. Use __builtin_infl where
available.
* tests/test-math.c: Check that INFINITY, NAN, HUGE_VALF, HUGE_VAL,
HUGE_VALL are constant expressions.
(main): Check the type of INFINITY and NAN.
ChangeLog
doc/posix-headers/math.texi
lib/math.in.h
tests/test-math.c