fmod

fnreal fmod(real x, real y) @trusted nothrow @nogc

Calculates the remainder from the calculation x/y.

Returns

The value of x - i * y, where i is the number of times that y can

be completely subtracted from x. The result has the same sign as x.

x y fmod(x, y) invalid?
±0.0 not 0.0 ±0.0 no
+∞ anything NaN yes
anything ±0.0 NaN yes
!=+∞ +∞ x no