Hacker News new | past | comments | ask | show | jobs | submit login

Google sheets does do decimal math so I'm not sure what you mean



It doesn’t use ordinary floats?


Unless my test methodology was flawed:

Displays 0.3:

"=0.1+0.2"

Displays 3E+79:

"=(0.1+0.2)*1e80"


That could be just the way it's displaying, e.g. to 14sf or something. If you try adding a million 0.1s and use a formula to compare to 100,000, that might tell you (with floats I got 100000.00000133288).

This question suggests it uses floats: https://stackoverflow.com/questions/74542790/google-sheet-yi...


Try "=((0.1+0.2)-0.3)*1e80" -- your test can be fooled by pretty standard rounding for display.


Oops -- nice, thank you! Sorry, guess I was mistaken




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: