Their attempts to "preserve IEEE FP "negative zero"", performs + -0.0, which will *always* force SNaN to QNaNYes - that does seem pretty general behaviour, but I'm not concerned about that.
In fact, I've come to the view that if an operation involving an SNAN does not throw an exception then the result might just as well be a QNAN - since the SNAN is effectively quiet anyway.
Perhaps that's the rationale behind the behaviour.
I see no reason to expect that an operation involving an SNAN cannot not return a QNAN when no exception is thrown and I can even see a case for propagating the SNAN as a QNAN.
However, I don't know what the relevant IEEE standards stipulate - and, obviously if this behaviour contravenes said standards then the behaviour should be changed.
The following won't work pre-5.10, and may not work on some later buildsOn 32-bit 5.22.0, 5.24.0 and latest blead the NV still gets set to 7ff8000000000001. (I didn't try any other perl versions.)
I don't personally need to be able to assign a double with internal representation of 7ff0000000000001, though I do think it's at least worth raising awareness of this bug in the 32-bit Windows builds.
But first I'll make a concerted effort to find a way to make that assignment.
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.