pub fn div_euclid(
span: Span,
dividend: DecNum,
divisor: Spanned<DecNum>,
) -> SourceResult<DecNum>Expand description
Performs euclidean division of two numbers.
The result of this computation is that of a division rounded to the integer
{n} such that the dividend is greater than or equal to {n} times
the divisor.
This can error if the resulting number is larger than the maximum value or smaller than the minimum value for its type.
#calc.div-euclid(7, 3) \
#calc.div-euclid(7, -3) \
#calc.div-euclid(-7, 3) \
#calc.div-euclid(-7, -3) \
#calc.div-euclid(1.75, 0.5) \
#calc.div-euclid(decimal("1.75"), decimal("0.5"))