Returns a number one greater than x, a long. Note - uses a primitive operator subject to overflow.
;; Illustrates the difference between (inc), (inc') and (unchecked-inc) ;; The "N" suffix denotes a BigInt instance ;; https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/BigInt.java Long/MAX_VALUE ;;=> 9223372036854775807 (inc Long/MAX_VALUE) ;;=> ArithmeticException integer overflow clojure.lang.Numbers.throwIntOverflow (Numbers.java:1501) (inc' Long/MAX_VALUE) ;;=> 9223372036854775808N ;; Notice how the resulting number becomes NEGATIVE: (unchecked-inc Long/MAX_VALUE) ;;=> -9223372036854775808
Returns the sum of x and y, both long. Note - uses a primitive operator subject to overflow.
Returns a number one less than x, a long. Note - uses a primitive operator subject to overflow.
Returns a number one greater than x, a long. Note - uses a primitive operator subject to overflow.
Returns the negation of x, a long. Note - uses a primitive operator subject to overflow.
Returns the difference of x and y, both long. Note - uses a primitive operator subject to overflow...
Returns the product of x and y, both long. Note - uses a primitive operator subject to overflow.
Returns a number one greater than num. Does not auto-promote longs, will throw on overflow. See al...
Returns a number one greater than num. Supports arbitrary precision. See also: inc
unchecked-inc