Generic math function interface This library defines generic versions of common mathematical functions such as sqrt or sin as multimethods that can be defined for any type.
Generic math function interface This library defines generic versions of common mathematical functions such as sqrt or sin as multimethods that can be defined for any type.
(abs x)
(abs x math-context)
Return the absolute value of x. If x is a BigDecimal, abs takes an optional math-context argument.
Return the absolute value of x. If x is a BigDecimal, abs takes an optional math-context argument.
(approx= x y eps)
Return true if the absolute value of the difference between x and y is less than eps.
Return true if the absolute value of the difference between x and y is less than eps.
(atan2 x y)
Return the atan2 of x and y.
Return the atan2 of x and y.
(conjugate x)
Return the conjugate of x.
Return the conjugate of x.
(defmacro- name & decls)
Same as defmacro but yields a private definition
Same as defmacro but yields a private definition
(round x)
(round x math-context)
Round x. If x is a BigDecimal, a math-context argument is also required: (round x math-context) If x is a Ratio, (round x) converts x to a double and rounds; (round x math-context) converts x to a BigDecimal and rounds.
Round x. If x is a BigDecimal, a math-context argument is also required: (round x math-context) If x is a Ratio, (round x) converts x to a double and rounds; (round x math-context) converts x to a BigDecimal and rounds.
(sgn x)
Return the sign of x (-1, 0, or 1).
Return the sign of x (-1, 0, or 1).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close