"I. Szczesniak" <iszczesniak at gmail.com> 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:joerg at schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin
js at cs.tu-berlin.de (uni)
schilling at fokus.fraunhofer.de (work) Blog:
http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily