Martin Krejcirik:

    float a = 1.23f;
    double b = to!float("1.23");
    assert (a == b); // ???
}

Should the assert fail or not ? (Please reply without trying first).

It's a bad question. Generally to compare floating point values for equality use std.math.feqrel.

Bye,
bearophile

Reply via email to