Division or reciprocation.
(/ x)
returns the reciprocal of x
. It's equivalent to (/ 1.0 x)
.
With two or more arguments, division is performed sequentially from left to right. Dividing an integer by a float, or vice-versa, produces a float.
The rounding behaviour for negative numbers is equivalent to Rust's /
operator -
if you need Euclidean division, use div-euclid
instead.
When dividing by zero, if the result would be an integer, it's an error. (It's not an
error to divide by zero when working with floating-point numbers. The result will
be an infinity value: -inf.0
or +inf.0
.)