// dmd 2.020
import std.stdio;
import std.string;
import core.thread;
void main()
{
real r = 12.0L;
string inThread;
string outThread;
auto t = new Thread({
inThread = format("%.20f", r);
});
t.start;
t.join;
outThread = format("%.20f", r);
writefln(inThread); // 11.99999999999999964400
writefln(outThread); // 12.00000000000000000000
assert(inThread == outThread); // core.exception.AssertException@main(17): Assertion failure
}
何でこんな結果に…?