# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #61942]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61942 >


<moritz_> perl6: say NaN ~~ NaN
<p6eval> ..pugs: OUTPUT«1␤»
<p6eval> ..rakudo 34888: OUTPUT«0␤»
<moritz_> masak: want to report as a bug?
<masak> moritz_: no.
<masak> moritz_: I think Rakudo is right.
<moritz_> masak: care to elaborate?
<masak> moritz_: well,
<moritz_> perl6: say NaN == NaN
<p6eval> rakudo 34888: OUTPUT«0␤»
<p6eval> ..elf 24743, pugs: OUTPUT«␤»
<masak> two NaN's can very well be different. there is not but one NaN.
<masak> that's part of the theory behind them.
<moritz_> masak: ~~ doesn't test equality
<eric256> then how do you do $num ~~ NaN?
<masak> moritz_: seems to me it does test equality in increasing amounts lately.
<eric256> rakudo: NaN === NaN
<p6eval> rakudo 34888: RESULT«Bool::False»
<masak> moritz_: but you have a point.
<moritz_> I think that $thing ~~ NaN should answer the questions "is
$thing a NaN`?"...
* masak reports rakudobug
<moritz_> just like $thing ~~ undef really desugars to !$thing.defined
<eric256> rakudo: my $nan = NaN; say $nan ~~ NaN;
<p6eval> rakudo 34888: OUTPUT«0␤»

Reply via email to