On Thu, 11 Mar 2004, David Berry wrote:
> I've just been poked by Bill Joye about the isnan problem in AST.
> Now that I look into this a bit more, it starts to dawn on me that the
> basic cause of the problem is that isnan is not part of the ansi
> standard. AST is compiled with "gcc -ansi" on linux which results in
> neither the isnan macro nor the isnan function being declared in math.h.
> This is why I had to put the extra prototype into mapping.c and specmap.c.
> I obviously didn't think enough about it at the time.
>
> One of the things that AST brags about is that it is pure "ansi C".
> So really the best solution would probably be for me to do away altogether
> with the isnan calls, by doing more checks before performing the
> calculations that potentially produce the nans which are being checked
> for.
David,
don't want to discourage "standardisation", but isnan is ANSI C, it's part
of the C99 standard. So in fact AST is ahead of most compilers... as you'd
expect!
Peter.
|