On Tuesday, 3 December 2019 at 09:22:49 UTC, Jan Hönig wrote:
Today i have stumbled on Hacker News into: https://0.30000000000000004.com/

I am learning D, that's why i have to ask.

Why does

    writefln("%.17f", .1+.2);

not evaluate into: 0.30000000000000004, like C++
but rather to: 0.29999999999999999

Many other languages evaluate to 0.30000000000000004 as well.

D lang could have a very good sprintf replacement.

Reply via email to