[Numpy-discussion] What is the sign of nan?

David Cournapeau david@ar.media.kyoto-u.ac...
Mon Sep 29 22:54:44 CDT 2008


Charles R Harris wrote:
>
>
> On Mon, Sep 29, 2008 at 9:02 PM, David Cournapeau
> <david@ar.media.kyoto-u.ac.jp <mailto:david@ar.media.kyoto-u.ac.jp>>
> wrote:
>
>     Charles R Harris wrote:
>     >
>     > So the proposition is, sign, max, min return nan when any of the
>     > arguments is nan.
>
>     Note that internally, signbit (the C function) returns an integer.
>
>
> That is the signature of the ufunc. It could be changed...

Nope, I am talking about the C99 signbit macro. man signbit tells me:

NAME
       signbit - test sign of a real floating point number

SYNOPSIS
       #include <math.h>

       int signbit(x);

       Compile with -std=c99; link with -lm.

cheers,

David


More information about the Numpy-discussion mailing list