Method: GMP::Z#fmod

Defined in:

#fmod(d) ⇒ Object

Divides n by d, forming a remainder r. r will have the same sign as d. The f stands for “floor”.

r will satisfy _n=q*d+r_, and r will satisfy _0 <= abs(r ) < abs(d)_.

This function calculates only the remainder.

The remainder can be negative, so the return value is the absolute value of the remainder.