[Issue 3632] modify float is float to do a bitwise compare

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 5 01:53:50 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=3632


Denis Shelomovskij <verylonglogin.reg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin.reg at gmail.com


--- Comment #29 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-11-05 12:53:25 MSK ---
So currently we have this:
---
void main()
{
    float f1, f2 = float.nan;
    assert(f1 !is f2); // ok

    import std.math;
    assert(NaN(0) !is NaN(1)); // ok
    assert(NaN(1) !is NaN(2)); // ok
}

static assert({
    float f1, f2 = float.nan;
    assert(f1 !is f2); // error, the only failing test
    return 1;
}());
---

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list