C Run-Time Library Reference
div
division
Synopsis
#include <stdlib.h>
div_t div(int numer, int denom);
Description
The
function divides
div
structure of type
typedef struct {
int quot;
int rem;
} div_t
where
is the quotient of the division and
quot
that if
is of type
result
result.quot * denom + result.rem == numer
Error Conditions
If
is zero, the behavior of the
denom
Example
#include <stdlib.h>
div_t result;
result = div(5, 2);
See Also
ldiv, fmod,
modf
3-50
by
numer
denom
. The type
div_t
div_t
div_t,
/* result.quot=2, result.rem=1 */
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
, both of type
is defined as
is the remainder, such
rem
function is undefined.
div
for ADSP-219x DSPs
, and returns a
int
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers