First question: I just noticed that writefln("%a", 1.2) writes 0x1.3333333333333p+0, while writeln(format("%a", 1.2)) (that is, with std.string.format) writes 0x9.9999999999998p-3 ... wouldn't it be nice to be consistent here? (The former is what printf in gcc gives.) Or am I missing a difference in functionality?

Second question: Just to make sure, this *is* an exact representation of the underlying floating-point number? (I.e., if that'w what I'm after, using %a *is* the way to go?)

--
Magnus Lie Hetland
http://hetland.org

Reply via email to