On 12/1/08, Chris Quenelle <Chris.Quenelle at sun.com> wrote:
>
>  Advice from someone who knows much more than me:
>
>
>  > C99 does not offer either issubnormal() or iszero().
>  >
>  > 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?

Irek

Reply via email to