Ben Pfaff wrote:
> I was under the impression that some platforms were missing isnan
> entirely, so that this was worth more than just "isnan() without
> libm". But I can't confidently name a system that lacks it.
The package I announced two days ago shows that most systems have isnan()
as a function:
$ ./show-portability isnan
libc freebsd-5.2.1
libc freebsd-6.0
libc irix-6.5
libc macosx-10.3
libc netbsd-3.0
libc openbsd-3.8
libc solaris-2.10
libc solaris-2.4
libc solaris-2.5.1
libc solaris-2.6
libc solaris-2.7
libc solaris-2.8
libc solaris-2.9
libcygwin cygwin
libm aix-4.3.2
libm aix-5.1.0
libm aix-5.1.0
libm cygwin
libm hpux-11.00
libm hpux-11.11
libm osf1-4.0d
libm osf1-5.1a
libm solaris-2.10
libm solaris-2.4
libm solaris-2.5.1
libm solaris-2.6
libm solaris-2.7
libm solaris-2.8
libm solaris-2.9
libroot beos
MISSING in mingw
and mingw has it as a macro:
#define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) \
: sizeof (x) == sizeof (double) ? __isnan (x) \
: __isnanl (x))
(confirming the point that Eric just made: that the 3 functions may have
completely different names than 'isnan', 'isnanf', 'isnanl').
Bruno