[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'isfinite'
From: |
Paul Eggert |
Subject: |
Re: new module 'isfinite' |
Date: |
Wed, 24 Oct 2007 00:42:51 -0700 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Ben Pfaff <address@hidden> writes:
> * Is it acceptable for isfinite to raise an exception on
> a signaling NaN?
Yes.
> * Is it acceptable to #include <float.h> in and put
> inline functions in math.in.h?
Yes, to both. Of course 'inline' needs to be configured.
But do you really need float.h? See below.
> +static inline int gl_isfinitef (float x)
> +{
> + return x >= -FLT_MAX && x <= FLT_MAX;
> +}
How about 'return x - x == 0;' instead? That's easier to configure;
you don't need to worry about <float.h>.