integer overflow
Conversation
Notices
-
Julia Evans (b0rk@social.jvns.ca)'s status on Friday, 20-Jan-2023 05:34:06 JST Julia Evans -
Adrian Cochrane (alcinnz@floss.social)'s status on Friday, 20-Jan-2023 06:06:12 JST Adrian Cochrane @b0rk Though regarding functional languages...
Haskell does have big ints built-in (called "Integer"s), but also fixed-size ints (called "Int"s). I'm not entirely sure which we it defaults, I'm mostly working with floats or other types.
-
Julia Evans (b0rk@social.jvns.ca)'s status on Friday, 20-Jan-2023 06:06:15 JST Julia Evans I think the list of languages that *don't* have integer overflow might be shorter actually. From quick research:
* Python 3 and Ruby's integer types are big integers (they get as big as can fit in memory)
* JS numbers are floating point, which causes different problems (but not integer overflow). JS has big integers too though.
* large PHP integers convert to floating point (similarly, can cause problems but not integer overflow)
* (from the replies) lots of functional languages have big ints
-