import std.conv; void main() { float a = 1.234f; float b = to!float("1.234"); assert (a == b); assert (a == to!float("1.234")); //fails } DMD32 D Compiler v2.066-devel-38c5c36 Works in gdc. Also works with real.
import std.conv; void main() { float a = 1.234f; real b = to!float("1.234"); assert (a == b); //fails } Maybe I'm missing something about fpu arithmetics, this fails too, but again works in gdc.
marking INVALID as floating point numbers shouldn't be compared directly for equality (machine and platform dependent).