float fmodf(float x, float y);
Returns a floating-point value that is the remainder resulting from dividing x by y.
If x is + or y is zero, fmodf returns a Not a Nuber(NaN) and sets macro ERANGE to global variable errno.
This function calculates a floating-point value that is the remainder resulting from dividing x by y. In other words, it calculates the value "x - i * y" for the maximum integer i that has a sign the same as x and is less than y, if y is not zero.
#include <mathf.h> void func(void) { float ret, x, y; ret = fmodf(x, y); /*Returns remainder resulting from dividing x by y to ret.*/ : } |