In fact, the Intel 8087 almost computes
i, r := a/b, a%b;
The floating point remainder function returns the reminader as the
function result, and the least 3 bits of the integer quotient are
stored in the condition codes. For some typical uses of the
remainder function (range reduction), this is all you need.
Bob