Perl does this by switching to double floats ...
Rather, perl switches to "NV" floats.
Of course, I'm nitpicking, but it's a nitpick that does have some significance.
On a perl whose ivsize=8, && whose nvtype is either 'long double' or '__float 128', I get:
D:\>perl -e "print 'wtf' unless ~0 < (~0) + 1;"
D:\>
But on a perl where ivsize=8 and nvtype is 'double' and you get:
D:\>perl -e "print 'wtf' unless ~0 < (~0) + 1;"
wtf
D:\>
Now that particular configuration (ivsize==8 and nvtype is 'double') is the
only perl configuration that produces that nonsense - and yet it's the most commonly used configuration !!
If you use either an ivsize of 4, or an nvtype that is
not double, then you can ignore that particular weirdness because it's not going to happen.
Note: That "nonsense" doesn't just happen with
(~0) + 1. It happens for
(~0) + $x for all $x in the range
1..2048.
That's mainly why I think of it as an insane configuration. (It's still a configuration that I regularly use ;-)
Cheers,
Rob
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.