Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
|
#include <stdlib.h>
Go to the source code of this file.
Functions | |
lldiv_t | lldiv (long long numer, long long denom) |
Computes both the quotient and the remainder of the division of the numerator x by the denominator y. More... | |
lldiv_t lldiv | ( | long long | x, |
long long | y | ||
) |
Computes both the quotient and the remainder of the division of the numerator x by the denominator y.
Computes both the quotient and the remainder of the division of the numerator x by the denominator y. Computes quotient and remainder simultaneously. The quotient is the algebraic quotient with any fractional part discarded (truncated towards zero). The remainder is such that quot * y + rem == x.
Computes the quotient (the result of the expression x/y) and remainder (the result of the expression xy) simultaneously.
x | integer values |
y | integer values |
If either the remainder or the quotient cannot be represented, the behavior is undefined.
Definition at line 30 of file lldiv.c.
References lldiv_t::quot, and lldiv_t::rem.