In short, when supplying the
rem function with doubles (reals) that are ostensibly divisible, the absolute value returned by
rem will either be very close to zero or very close to the divisor, depending on whether the rounding of the doubles is above or below the value displayed.
Hence, some tolerance is required for comparisons, e.g.:
_$ (div-p 1.8 0.3)
T
_$ (div-p 1.9 0.1)
T
_$ (div-p -1.9 0.1)
T