News for hackers. Stuff that matters.
Re:0.30000000000000004 by santaclaus on Sunday April 02, 2017 @03:26PM (#14018543)
The C++ code could use std::numeric_limits<double>:: max_digits10 instead of the magical 17!
Re:0.30000000000000004 by jwilk on Sunday April 02, 2017 @04:13PM (#14018810)
Similarly, for C it could be:

  printf("%.*f\n", DBL_DECIMAL_DIG, .1+.2)
In both cases, support for a relatively new language standard (C++11, C11) would be required.
Re:0.30000000000000004 by TwoBit on Sunday April 02, 2017 @06:01PM (#14019288)
2011 was six years ago.
Re:0.30000000000000004 by saghm on Sunday April 02, 2017 @07:48PM (#14019728)
In terms of C and C++, that's fairly new. Lots of older code using pre-C11/C++11 standards is out there.
Re:0.30000000000000004 by Nuzzerino on Sunday April 02, 2017 @06:14PM (#14019355)
Hence the phrase "relatively new".
Re:0.30000000000000004 by arkitaip on Sunday April 02, 2017 @03:30PM (#14018566)
That reads like the code equivalent of involuntarily burping in polite company.