oils-for-unix / oils

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
http://www.oilshell.org/
Other
2.84k stars 157 forks source link

Oils integers should be arbitrary precision (OSH and YSH) #2112

Open andychu opened 3 days ago

andychu commented 3 days ago

related to

ale5000-git commented 3 days ago

Are you sure "arbitrary precision" won't cause problems? (like floating-point) Isn't 64-bit (long long) enough?

I have seen one implementation where when using printf on this "9223372036854775807" instead of requested number it display this: 9223372036854775808 and when using printf on this "18446744073709551615" instead of requested number it display this: 1.84467e+19

I hope this change doesn't cause this.

andychu commented 3 days ago

I mean like CPython -- the integers can be as large as you want, but also exact