# New Ticket Created by  Zefram 
# Please include the string:  [perl #128999]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128999 >


> (0e0).WHICH
Num|0
> (-0e0).WHICH
Num|-0
> 0e0 === -0e0
True

These two Num values are distinct: they are the floating-point signed
zeroes, which have different numeric behaviour in some situations.
The .WHICH values correctly distinguish them.  The === operator is
incorrect in saying that they are the same object.  The same problem
arises with Complex numbers with zero real or imaginary parts:

> <-0+0i>.WHICH
Complex|-0|0
> <0+0i>.WHICH
Complex|0|0
> <0-0i>.WHICH
Complex|0|-0
> <-0-0i>.WHICH
Complex|-0|-0
> <-0+0i> === <0+0i> === <0-0i> === <-0-0i>
True

-zefram

Reply via email to