At 21:16 +0100 9/9/07, Nicholas Clark wrote:
>On Sun, Sep 09, 2007 at 10:56:20AM -0700, Jrg Plate wrote:
> > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=45309 >
> > This patch implements the sign function for I, N, BigInt and Complex 
>> numbers.
>
>What should the sign of a NaN be? undef?

Some, if not most, NAN's do have a sign. Positive overflow (infinity) and 
negative overflow are examples that certainly are signed quantities.

The sign of zero, where there really are two bit patterns representing minus 
and plus zero, has been discussed and there might already be a resolution.

NAN's only apply to floats.  I can imagine a user-invented NaN that includes 
positive and negative versions. I would just return the sign bit from the left 
end of the binary.

A better question might be just what is meant by the sign of a complex pair.

-- 

--> From the U S of A, the only socialist country that refuses to admit it. <--

Reply via email to