#include <stdlib.h>
ldiv_t ldiv(long numer, long denom);
The ldiv() function
computes the quotient and remainder of the division of the
numerator numer by the denominator denom. If the
division is inexact, the resulting quotient is the long integer
of lesser magnitude that is the nearest to the algebraic quotient.
If the result cannot be represented, the behavior is undefined; otherwise,
quot * denom + rem equals
numer.
- numer
-
Is the numerator.
- denom
-
Is the denominator.
The ldiv() function returns a structure of type
ldiv_t, comprising both the quotient and the
remainder. The structure includes the members, long quot,
the quotient, and long rem, the remainder.
ANSI/ISO 9899-1990.
MT-Safe.
None.
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
- Functions:
- div()
MKS Toolkit 9.3 Documentation Build 6.