remainder(), remainderf(), drem(), dremf()

calculate remainder 

Function


SYNOPSIS

#include <math.h>

double remainder(double x, double y);

float remainderf(float x, float y);

double drem(double x, double y);

float dremf(float x, float y);


DESCRIPTION

The remainder() function returns the remainder r:

x - n * y;

where n is the integer nearest the exact value of x/y; if |n - x/y| = 1/2, then n is even.

The drem() function is identical to remainder().

The remainderf() and dremf() functions are single-precision versions of remainder() and drem() respectively.


PARAMETERS

x 

The value of the numerator.

y 

The value of the denominator.


RETURN VALUES

The remainder() function returns the remainder r as defined above.

If y is 0.0 or x is Infinity and y is 0.0, remainder() returns NaN. If in POSIX mode, errno is set to EDOM, if in SVID or XOPEN modes, matherror() is called.


CONFORMANCE

remainder(): UNIX 98

drem(): 4.4BSD


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
fmod()


MKS Toolkit 9.2 Documentation Build 16.