Extended Number Operations

Function: quotient x y

Generalized to arbitrary real numbers, using the definition: (truncate (/ x y)).

Function: remainder x y

Generalized to arbitrary real numbers, using the definition: (- x (* y (truncate (/ x y)))). If y is 0, the result is x - i.e. we take (* 0 (quotient x 0)) to be 0. The result is inexact if either argument is inexact, even if x is exact and y is 0.

Function: modulo x y

Generalized to arbitrary real numbers, using the definition: (- x (* y (floor (/ x y)))). If y is 0, the result is x. The result is inexact if either argument is inexact, even if x is exact and y is 0.