Returns the product of all the arguments
Returns the product of all the arguments
Returns the sum of all arguments
Returns the sum of all arguments
Returns the difference of the first argument and the sum of all rest do the arguments
Returns the difference of the first argument and the sum of all rest do the arguments
(/ x)
(/ x y)
(/ x y & more)
Return the quotient of the first argument and the product of all other arguments.
Return the quotient of the first argument and the product of all other arguments.
Return true if each argument is smaller than the following ones.
Return true if each argument is smaller than the following ones.
Return true if each argument is smaller than or equal to the following ones.
Return true if each argument is smaller than or equal to the following ones.
Return true if all arguments are equal.
Return true if all arguments are equal.
Return true if each argument is larger than the following ones.
Return true if each argument is larger than the following ones.
Return true if each argument is larger than or equal to the following ones.
Return true if each argument is larger than or equal to the following ones.
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.
(arity-dispatch)
(arity-dispatch x)
(arity-dispatch x y)
(arity-dispatch x y & more)
Return the quotient of the first argument and the product of all other arguments
Return the quotient of the first argument and the product of all other arguments
(fn-average f rng)
(fn-average f lower upper)
(fn-average f lower upper n)
Maps f
across all the elements in rng
and computes the average of
the outputs. Instead of range, upper and lower can be provided,
with an optional number of steps (default: 100) (see linspace).
Maps `f` across all the elements in `rng` and computes the average of the outputs. Instead of range, upper and lower can be provided, with an optional number of steps (default: 100) (see linspace).
(interpolate data)
(interpolate data x-key y-key)
Given data
that consists of a sequence of collections (typically
maps or tuples), this function will sort it by x-key
and return a
function that given an arbitrary x-val
, will return the
interpolated value for y-key
.
If x-key
and y-key
are not provided, they default to first
and
second
, for working with tuples.
If x-val
is outside the range of the x-key values for the data,
the outermost y value is returned.
Given `data` that consists of a sequence of collections (typically maps or tuples), this function will sort it by `x-key` and return a function that given an arbitrary `x-val`, will return the interpolated value for `y-key`. If `x-key` and `y-key` are not provided, they default to `first` and `second`, for working with tuples. If `x-val` is outside the range of the x-key values for the data, the outermost y value is returned.
(linspace lower upper n)
Outputs a range with n
equally spaced elements, the first one being
lower
and the last one being upper
.
Outputs a range with `n` equally spaced elements, the first one being `lower` and the last one being `upper`.
(max x)
(max x y)
(max x y & more)
Returns the greatest of its arguments.
Returns the greatest of its arguments.
(min x)
(min x y)
(min x y & more)
Returns the least of its arguments.
Returns the least of its arguments.
Return true if x
is negative.
Return true if `x` is negative.
Return true if x
is positive.
Return true if `x` is positive.
Returns a rounded value of x
. If x
is a BigDecimal, a math-context
argument is required. If x
is a Ratio, it is converted to a Double before
rounding. If a x
is a Ratio and a math-context
is provided, it is
converted to a BigDecimal before rounding.
Returns a rounded value of `x`. If `x` is a BigDecimal, a `math-context` argument is required. If `x` is a Ratio, it is converted to a Double before rounding. If a `x` is a Ratio and a `math-context` is provided, it is converted to a BigDecimal before rounding.
Returns the same type or unit-type with a value of zero.
Returns the same type or unit-type with a value of zero.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close