Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Remainder Functions

Many routines in the Intel® C++ Compiler Classic Math Library are more optimized for Intel® microprocessors than for non-Intel microprocessors.

The mathimf.h header file includes prototypes for Intel® C++ Compiler Classic Math Library functions.

The 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 y = 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.

errno: EDOM, for y = 0

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 2n of the integral quotient of x/y. N is an implementation-defined integer. For all systems, N is equal to 31.

errno: EDOM, for y = 0

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);