in reply to Re^2: Incrementing "Infinity" bug (numification, perlnumber, magic increment decrement)
in thread Incrementing "Infinity" bug
It's a bug or at least a design flow.
How do you figure? I think it isn't
So why doesn't Perl do this per default?
You know why, tradition (backwards compatibility ). "barewords" have always been strings
Also style, lowercase constants are unbecoming :p
do we really need to use hacks like 1e9999 to create inf?
We never needed that, use 0+'inf' or int '-inf' ...
But hey, one of the math modules could export ... or even use feature 'infinity'; could happen though I don't see the benefit, but what do I know
$ perl -le " for(1..4){ print for \int 'infinity', \int'-infinity' } +" SCALAR(0x99bc74) SCALAR(0x99bc64) SCALAR(0x99bc74) SCALAR(0x99bc64) SCALAR(0x99bc74) SCALAR(0x99bc64) SCALAR(0x99bc74) SCALAR(0x99bc64)
update: nans, infs, and vomit, How to create nan/inf says bigint/bigrat export inf that stringifies to inf
Also note Re^3: nans, infs, and vomit (underlying c-runtime and strtod, atof)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Incrementing "Infinity" bug (numification, perlnumber, magic increment decrement)
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 |