Remainder Functions

The Intel Math library supports the following remainder functions:

FMOD

Description: The fmod function returns the value x-n*y for integer n such that if y is nonzero, the result has the same sign as x and magnitude less than the magnitude of y.

errno: EDOM, for x = 0

Calling interface:
double fmod(double x, double y);
long double fmodl(long double x, long double y);
float fmodf(float x, float y);

REMAINDER

Description: The remainder function returns the value of x REM y as required by the IEEE standard.

Calling interface:
double remainder(double x, double y);
long double remainderl(long double x, long double y);
float remainderf(float x, float y);

REMQUO

Description: The remquo function returns the value of x REM y. In the object pointed to by quo the function stores a value whose sign is the sign of x/y and whose magnitude is congruent modulo 224 of the integral quotient of x/y, where n is an implementation-defined integer greater than or equal to 3.

Calling interface:
double remquo(double x, double y, int *quo);
long double remquol(long double x, long double y, int *quo);
float remquof(float x, float y, int *quo);