Embedded Artistry Framework
Embedded Systems C++ Framework
Functions
div.c File Reference
#include <stdlib.h>
Include dependency graph for div.c:

Functions

div_t div (int num, int denom)
 Computes both the quotient and the remainder of the division of the numerator x by the denominator y. More...
 

Function Documentation

◆ div()

div_t div ( int  x,
int  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.

Parameters
xinteger values
yinteger values
Returns
If both the remainder and the quotient can be represented as objects of the corresponding type (int, long, long long, imaxdiv_t, respectively), returns both as an object of type
See also
div_t,
ldiv_t,
lldiv_t,
imaxdiv_t.

If either the remainder or the quotient cannot be represented, the behavior is undefined.

References r.

Referenced by div_test(), and lldiv_test().

Here is the caller graph for this function: