I don't think it helps ... unless I've missed something in there.
Basically, if I have:
float x = 123.1; float y = 123.1;
then I expect x == y to be true - and every compiler that I have at my disposal supports that expectation.
Similarly, if I have:
float x = 123.1; double y = 123.1;
then I expect x == (float)y to be true - and every compiler that I have at my disposal (except MSVC++ 7.0) supports that expectation.
What I'm seeking is some means of bringing the insane MSVC++ 7.0 (and presumably all other MSVC++ versions prior to 8.0) behaviour into line with the behaviour of these other sane compilers.

It's a question of consistency between compilers. Unless I'm relying on behaviour that the standards classify as "implementation dependent" or "undefined", then it should be the same with all compilers. (If I *am* relying on "implementation dependent"/"undefined" behaviour, then PDL needs a siginificant rewrite - because there are a number of places where the PDL sources assume that behaviour is neither "implementation dependent" nor "undefined".)

Cheers,
Rob

In reply to Re^2: [Win32, C, and way OT] C floats, doubles, and their equivalence by syphilis
in thread [Win32, C, and way OT] C floats, doubles, and their equivalence by syphilis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.