News for hackers. Stuff that matters.
Re:What every computer programmer should know about floating... by brucedawson on Tuesday September 16, 2014 @11:27AM (#8324958)
The round-tripping behavior is certainly cool, but my favorite float-fact is still this one:

double pi = 3.14159265358979323846; printf("pi = %.33f\n + %.33f\n", pi, sin(pi));

sin(double(pi)) is equal to the error in the double(pi) constant. If you manually add the two you can easily get pi to about 34 digits. Useless, but cool. I discuss this in more detail here: http://randomascii.wordpress.com/2012/02/25/comparing-floati...

Re:What every computer programmer should know about floating... by forrestthewoods on Tuesday September 16, 2014 @11:47AM (#8325062)
if I didn't encounter it personally it can't possibly be my favorite