Function Block FMOD

The function block FMOD calculates the remainder of a floating-point division.

First Input

Defines the dividend as a floating-point number.

Second Input

Defines the divisor as a floating-point number.

Output

Calculates the floating-point remainder of the division of the dividend of the first input by the divisor of the second input. The remainder is calculated for an integer division result as follows:

x = i * y + r

If y is not equal to 0, then r has the same sign as x and is less than y.

See Also