fmodf


Calculate the remainder

[Classification]

Mathematical library

[Syntax]

#include <math.h>

float __far fmodf(float x, float y);

[Return value]

Returns a floating-point value that is the remainder resulting from dividing x by y.

If x or y is a Not-a-Number (NaN) , fmodf returns a Not-a-Number (NaN) and sets macro EDOM to global variable errno.

If x is ±∞ or y is zero, fmodf returns a Not-a-Number (NaN) and sets macro EDOM to global variable errno.

If x is not ±∞ or y is ±∞, fmodf returns x and sets macro EDOM to global variable errno.

[Description]

This function calculates a floating-point value that is the remainder resulting from dividing x by y. In other words, the value of "x - i * y" for integer i is calculated when y is not 0. The result has the same sign as that of x, and the absolute value is smaller than that of y.