POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/math.h.html
Portability problems fixed by Gnulib:
int
to long double
in incorrect on some
platforms:
glibc 2.7 on Linux/SPARC64.
NAN
is not defined on some platforms:
OpenBSD 4.0, AIX 5.1.
NAN
is not exposed outside of C99 compilation on some
platforms:
glibc.
NAN
and HUGE_VAL
expand to a function address
rather than a floating point constant on some platforms:
Solaris 10.
HUGE_VALF
and HUGE_VALL
are not defined on some
platforms:
glibc/HPPA, glibc/SPARC, AIX 5.1, Solaris 9, MSVC 9.
FP_ILOGB0
and FP_ILOGBNAN
are not defined on some
platforms:
NetBSD 5.1, AIX 5.1, Solaris 9, MSVC 9.
HUGE_VAL
, HUGE_VALF
, HUGE_VALL
are not compile time
constants on some platforms:
FreeBSD 5.2, AIX 7.1.
INFINITY
and NAN
are not compile time constants
on some platforms:
FreeBSD 5.2, AIX 7.1.
INFINITY
and NAN
are of type double
instead of float
on some platforms:
FreeBSD 7.1, mingw 5.0.
NAN
, HUGE_VALL
, and INFINITY
are not
defined on some platforms:
OpenVMS.
Portability problems not fixed by Gnulib:
NAN
is not a compile time constant with some compilers:
OpenVMS.
math_errhandling
is not defined on some platforms:
glibc 2.11, OpenBSD 4.9, NetBSD 5.1, UP-UX 11, Cygwin 1.7.9, mingw, MSVC 9.
FP_ILOGB0
and FP_ILOGBNAN
have wrong values on some
platforms:
Haiku before 2023-04-08.