floating point conversion

Martin Krejcirik via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 1 08:31:52 PDT 2014


On 1.6.2014 16:42, Famous wrote:
> from string should be the same, exacly, always. Casting a float to
> double should be deterministic as well.

void main()
{
    float a = 1.234f;
    double b = 1.234;
    assert (a == cast(float) b); // fails in DMD x86, works in GDC, LDC
}

Maybe enhancement request ?


-- 
mk


More information about the Digitalmars-d-learn mailing list