Method on @infsup: rem (X, Y)

Compute the remainder of the division X by Y.

Conceptionally, it is given by the expression X - Y .* fix (X ./ Y). For negative X, the remainder will be either zero or negative. This function is undefined for Y = 0.

Accuracy: The result is a valid enclosure.

rem (infsup (3), infsup (2))
  ⇒ ans = [1]
rem (infsup (-3), infsup (2))
  ⇒ ans = [-1]

See also: @infsup/rdivide, @infsup/mod.

Package: interval