store/[org.clojure/clojure "1.8.0"] clj::clojure.core/quot

Official Documentation

Add notes
Arities
==================================================
   [num div]

Docstring
==================================================
  quot[ient] of dividing numerator by denominator.

Source

(defn quot
  "quot[ient] of dividing numerator by denominator."
  {:added "1.0"
   :static true
   :inline (fn [x y] `(. clojure.lang.Numbers (quotient ~x ~y)))}
  [num div]
    (. clojure.lang.Numbers (quotient num div)))

Example 1

Edit
;; note that the "/" function and the quot function are not equivalent

(= (/ 4 2) (quot 4 2))
;; => true

(= (/ 3 2) (quot 3 2))
;; => false

Example 2

Edit
;; (quot m n) is the value of m/n, rounded towards 0 to the nearest integer.
;; m, n need not be integers.

(quot 10 3)
;; => 3

(quot 11 3)
;; => 3

(quot 12 3)
;; => 4

(quot -5.9 3)
;; => -1.0

(quot 10 -3)
;; => -3

(quot 15 0)
;; => ArithmeticException / by zero  clojure.lang.Numbers.quotient (Numbers.java:1764)

Uses on crossclj