develooper Front page | perl.perl5.porters | Postings from October 2011

[perl #61448] "sort { $a <=> $b }" silent on <=> returning non-number

Thread Previous
From:
Father Chrysostomos via RT
Date:
October 13, 2011 08:25
Subject:
[perl #61448] "sort { $a <=> $b }" silent on <=> returning non-number
Message ID:
rt-3.6.HEAD-31297-1318519526-1662.61448-15-0@perl.org
On Wed Dec 17 14:35:52 2008, ikegami@adaelis.com wrote:
> # I don't know how else to generate a NaN in ActivePerl.
> my $nan = unpack 'd', scalar reverse pack 'H*', '0x7FFFFFFFFFFFFFFF';

You can use sin(9**9**9), which produces a negative nan. -sin(...)
produces a positive nan.  But in 32-bit ActivePerl, nan breaks if you
try to do anything with it.

(See also <https://rt.cpan.org/Public/Bug/Display.html?id=65876>).


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About