in reply to How to create nan/inf
my $inf = exp(~0 >> 1); my $nan = $inf / $inf; my $neg_inf = -$inf; [download]