2 ms·
Pike, Haskell. Clojure makes a gesture toward it, literals are automatically promoted but the normal operators don't do it: user=> (+ 1 9223372036854775807)
by fulafel 4y ago
Pike, Haskell.
Clojure makes a gesture toward it, literals are automatically promoted but the normal operators don't do it:
user=> (+ 1 9223372036854775807) ;; max signed int64
Execution error (ArithmeticException) at user/eval5 (REPL:1).
integer overflow
user=> (+ 1 9223372036854775808) ;; one higher
9223372036854775809N
- eesmith 4y agoTcl. In tclsh: % expr 1 + 9223372036854775807 9223372036854775808 % expr 9223372036854775808 + 1 9223372036854775809