Returns the remainder of division of x by y, both int or long.
Note - uses a primitive operator subject to truncation.
user=> (unchecked-remainder 0 0) java.lang.ArithmeticException: / by zero (NO_SOURCE_FILE:0) user=> (unchecked-remainder Integer/MAX_VALUE Integer/MIN_VALUE) 2147483647 user=> (unchecked-remainder 0 Integer/MAX_VALUE) 0 user=> (unchecked-remainder 1 Integer/MAX_VALUE) 1 user=> (unchecked-remainder Integer/MAX_VALUE Integer/MAX_VALUE) 0 user=> (unchecked-remainder Integer/MIN_VALUE Integer/MAX_VALUE) -1 user=> (unchecked-remainder -20 90) -20 user=> (unchecked-remainder Integer/MAX_VALUE Long/MIN_VALUE) java.lang.IllegalArgumentException: No matching method found: unchecked_remainder (NO_SOURCE_FILE:0)
Returns the difference of x and y, both int or long. Note - uses a
Returns the product of x and y, both int or long. Note - uses a pri
Returns the remainder of division of x by y, both int or long. Note
(defn unchecked-remainder
"Returns the remainder of division of x by y, both int or long.
Note - uses a primitive operator subject to truncation."
{:inline (fn [x y] `(. clojure.lang.Numbers (unchecked_remainder ~x ~y)))
:added "1.0"}
[x y] (. clojure.lang.Numbers (unchecked_remainder x y)))
Comments top
No comments for unchecked-remainder. Log in to add a comment.