"I. Szczesniak" <[EMAIL PROTECTED]> wrote:
> > > Since C99 mode is in use, both issubnormal() and iszero() can be easily
> > > implemented with the C99 fpclassify() classification macro:
> > >
> > > #include <math.h>
> > > #undef issubnormal
> > > #define issubnormal(x) (fpclassify(x) == FP_SUBNORMAL)
> > > #undef iszero
> > > #define iszero(x) (fpclassify(x) == FP_ZERO)
> > >
> > > No need to rely on anything Sun/Linux-specific, really.
>
> iszero() is not Linux-specific. Why does every Unix platform with the
> sole exception of Solaris supply a iszero() function in libm?
Iszero is not a POSIX standard interface.
fpclassify(), isfinite(), isinf(), isnormal(), signbit() all are in the POSIX
standard.
A program should be more portable it if uses fpclassify(x) == FP_ZERO
instead of iszero(x)
Jörg
--
EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
[EMAIL PROTECTED] (uni)
[EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code