quot[ient] of dividing numerator by denominator.
;; (quot m n) is the value of m/n, rounded towards 0 to the nearest integer. ;; m, n need not be integers. user=> (quot 10 3) 3 user=> (quot 11 3) 3 user=> (quot 12 3) 4 user=> (quot -5.9 3) -1.0 user=> (quot 10 -3) -3 user=> (quot 15 0) ArithmeticException / by zero clojure.lang.Numbers.quotient (Numbers.java:1764) ;; For ClojureScript (at least v1.10.597), `num`, `div` should be integer. ;; Otherwise, it does not work correctly due to its implementation: http://cljs.github.io/api/cljs.core/quot ;; in clojure, user=> (quot 286.3 21.2) 13.0 ;; in clojurescript cljs.user=> (quot 286.3 21.2) 12
;; note that the "/" function and the quot function are not equivalent user=> (= (/ 4 2) (quot 4 2)) true user=> (= (/ 3 2) (quot 3 2)) false
Returns the division of x by y, both int. Note - uses a primitive operator subject to truncation.
If no denominators are supplied, returns 1/numerator, else returns numerator divided by all of the...
Integer division that rounds to negative infinity (as opposed to zero). The special case (floorDiv...
quot