Hi David,

On Mon, Sep 29, 2008 at 9:07 PM, David Cournapeau <
[EMAIL PROTECTED]> wrote:

> Charles R Harris wrote:
> >
> > Thanks, that was very helpful. I wonder how widespread the less,
> > lessequal, etc. macros are?
>
> If it is C99, count on some platforms (MS in particular) to not do it.
> Also, when doing things in C, beware that some compilers break most
> reasonable expectations about floating points. In particular, x - x
> where x is a NaN or inf will returns 0 with MS compilers with the
> compiler flags currently used in python (/Ox), which breaks almost any
> code out there relying on proper NaN/Inf handling. So if possible,
> special case with isnan/isinf/isfinite
>

Do any of the MS compilers handle these things correctly? I am loath to load
up the code with expensive macros just to deal with bass ackwards compilers.
Especially if I have to special case all the infs also. However, if I can
use ifdefs to compile various versions I could be talked into it. OTOH, we
could just say the results are undefined when non-conforming compilers are
used.

Chuck
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to