4 ms·
There's more: 1,000,000,000: Errr, a few franchises? 1,000,000,000,000: You could probably buy all of McDonalds stock for that kind of money. Oh and apparent
by ElbertF 16y ago
There's more:
1,000,000,000: Errr, a few franchises?
1,000,000,000,000: You could probably buy all of McDonalds stock for that kind of money.
Oh and apparently you can buy a Sundae for as little as $.999999999999999949.
- pluies 16y ago> Oh and apparently you can buy a Sundae for as little as $.999999999999999949. Damn, I was sure hackers here would test the edge cases, but I thought it would hold! :) What you describe look like a weird behaviour in Ruby's string parsing to int (if I remember my code correctly), but I'll look into it.
- ElbertF 16y agoI wouldn't worry about it, it's just how Ruby and most other languages handle floats. Do a search on Google for "ruby float precision".