Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
|
#include <stdlib.h>
Go to the source code of this file.
Functions | |
imaxdiv_t | imaxdiv (intmax_t numer, intmax_t denom) |
Computes both the quotient and the remainder of the division of the numerator x by the denominator y. More... | |
imaxdiv_t imaxdiv | ( | intmax_t | numer, |
intmax_t | denom | ||
) |
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.
numer | intmax_t values (numerator) |
denom | intmax_t values (denominator) |
If either the remainder or the quotient cannot be represented, the behavior is undefined.
Definition at line 30 of file imaxdiv.c.
References imaxdiv_t::quot, and imaxdiv_t::rem.