[Numpy-discussion] What is the sign of nan?
Charles R Harris
charlesr.harris@gmail....
Tue Sep 30 01:25:48 CDT 2008
On Mon, Sep 29, 2008 at 11:56 PM, David Cournapeau <
david@ar.media.kyoto-u.ac.jp> wrote:
> Nathan Bell wrote:
> >
> > +1 for NaN-always-propagates since we have explicit variants for the
> > alternative semantics.
> >
> > Users are more likely to remember that "NaNs always propagate" than
> > "as stated in the C99 standard...".
>
> I don't know. I would like to agree with you, but OTOH, starting to go
> against the C99 standard may bring us quite far. FWIW, matlab has the
> same behavior as mandated by C99 (but not R, by default).
>
> The problem I have with fmax is that:
> - isgreaterequal may be slow ? May well be red-herring.
For gcc, isgreaterequal should be the same as >= the way numpy is set up
now, i.e., no errors raised. Looking at the assembly it all looked pretty
clean with both numbers stored in the FPU. What I couldn't figure is why
every compare needed to be done afresh, i.e. a > b and a == b had to run two
compares, this on variables declared constant. I'm kind of inclined to
follow the C standard as I figure there is already a lot of discussion
behind it and it would be kind of a waste to hash it all out again on this
list.
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080930/8475a246/attachment.html
More information about the Numpy-discussion
mailing list