in reply to Re: Incrementing "Infinity" bug (numification, perlnumber, magic increment decrement)
in thread Incrementing "Infinity" bug
It's a bug or at least a design flow.
Creating a constant which returns a numified inf easily fixes this problem
DB<100> use constant inf => inf+0 => 0 DB<101> $a=inf => "inf" DB<102> ++$a => "inf" DB<103> ++$a => "inf"
So why doesn't Perl do this per default?
do we really need to use hacks like 1e9999 to create inf?
Cheers Rolf
( addicted to the Perl Programming Language)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Incrementing "Infinity" bug (numification, perlnumber, magic increment decrement)
by Anonymous Monk on Mar 25, 2013 at 07:17 UTC | |
by LanX (Saint) on Mar 25, 2013 at 12:33 UTC | |
by Anonymous Monk on Mar 26, 2013 at 08:49 UTC | |
by LanX (Saint) on Mar 26, 2013 at 11:47 UTC | |
by Anonymous Monk on Mar 26, 2013 at 11:54 UTC |
In Section
Seekers of Perl Wisdom