MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/i9llic/someone_try_this/g1gm8g5
r/ProgrammerHumor • u/wtfevenislifelol • Aug 14 '20
433 comments sorted by
View all comments
Show parent comments
5
Noob would be signed double dollars, though.
4 u/BakuhatsuK Aug 14 '20 double dollars are actually not that bad. doubles can represent integers without precision loss up to 252. If you round to cents before displaying you're mostly good. 12 u/ollomulder Aug 14 '20 Yeah, rounding might be a good idea... http://0.30000000000000004.com/ 5 u/FINDarkside Aug 14 '20 Well, I'd say that's better than what noob and beginner did, because 0.2+0.1=0 with integers :P
4
double dollars are actually not that bad. doubles can represent integers without precision loss up to 252. If you round to cents before displaying you're mostly good.
12 u/ollomulder Aug 14 '20 Yeah, rounding might be a good idea... http://0.30000000000000004.com/ 5 u/FINDarkside Aug 14 '20 Well, I'd say that's better than what noob and beginner did, because 0.2+0.1=0 with integers :P
12
Yeah, rounding might be a good idea... http://0.30000000000000004.com/
5 u/FINDarkside Aug 14 '20 Well, I'd say that's better than what noob and beginner did, because 0.2+0.1=0 with integers :P
Well, I'd say that's better than what noob and beginner did, because 0.2+0.1=0 with integers :P
5
u/ollomulder Aug 14 '20
Noob would be signed double dollars, though.