Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

round

Name: Anonymous 2007-05-17 11:03 ID:ewt37wAw

Prelude> round 0.5
0
Prelude> round 1.5
2
Prelude> round 2.5
2
Prelude> round 3.5
4


WHAT THE FUCK

Name: Anonymous 2007-05-18 12:03 ID:YQm8yWVM

>>18
+1 Insightful
I understand, though consider floating point numbers don't stop at the first fractionary digit; actually the 5 that you'll arbitrarily round up (or down) will be far smaller for this to matter much. You can rely on having 16-17 decimal digits at the very least, and we can consider 1 million accounts will have an average of 5 digit accounts. This will mean there'll be at least 10 fractional digits, and you lose or win (if a bank or employer, win) just 1E-10 * 1E-1 * 1E+6 = 1E-5 dollars. Not even Scrooge would care for that.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List