I'm writing an arbitrary-precision arithmetic library.
I have methods to calculate the quotient and remainder of a division.
I'd now like to add the modulo operator. Modulo and remainder are not the same for negative numbers.
How can I calculate the modulo of 2 numbers, using a remainder() function and other basic arithmetic operations?