Divides numerator by denominator, and computes the quotient and remainder.
#include <stdlib.h> ldiv_t ldiv (long int numer, long int denom);
numer
denom
The sign of the quotient is the same as that of the mathematical quotient. Its absolute value is the largest integer that is less than the absolute value of the mathematical quotient.
ldiv is similar to div, except that the arguments and the members of the returned structure are long integers.
An LDIV_T structure, comprising both the quotient and the remainder, defined in stdlib.h
.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/stdlib.h | stdlib.h | clib.lib |