On Tuesday, 3 December 2019 at 09:22:49 UTC, Jan Hönig wrote:
not evaluate into: 0.30000000000000004, like C++ but rather to: 0.29999999999999999
You get the same in C++ with: #include <cstdio> int main() { printf("%.17f",double(0.1L + 0.2L)); }
Ola Fosheim Grøstad via Digitalmars-d-learn Tue, 03 Dec 2019 03:11:42 -0800
On Tuesday, 3 December 2019 at 09:22:49 UTC, Jan Hönig wrote:
not evaluate into: 0.30000000000000004, like C++ but rather to: 0.29999999999999999
You get the same in C++ with: #include <cstdio> int main() { printf("%.17f",double(0.1L + 0.2L)); }