Math | Android Developers
Returns the remainder of dividing x by y using the IEEE 754 rules. The result is x-round(x/p)*p where round(x/p) is the nearest integer (rounded to even), but without numerical cancellation problems. Special cases: IEEEremainder((anything), 0) = NaN...