in reply to Different values while applying format specifiers
If I run
I get the outputprintf("%.16f\n",100 * 5.1);
The difference is that normal print does a formatted round (I think %.8g) that rounds up to 510, whereas %d casts it as a signed integer, a.k.a. performs a floor and rounds down to 509.509.9999999999999400
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|