fmod
fmod
Returns the floating point remainder (modulo) of the division of the arguments
float **fmod** float $num1 float $num2
Returns the floating point remainder of dividing the dividend
() by the divisor ().
The remainder () is defined as: num1 = i * num2 + r, for
some integer . If is
non-zero, has the same sign as
and a magnitude less than the magnitude of
.
num1``num2``r``i``num2``r``num1``num2
num1The dividend
num2The divisor
The floating point remainder of
/.
() if the second argument is 0.
num1``num2``NAN``float
**Voorbeeld: Using **
<?php
$x = 5.7;
$y = 1.3;
$r = fmod($x, $y);
// $r equals 0.5, because 4 * 1.3 + 0.5 = 5.7
var_dump($x, $y, $r);
?>
/%intdiv