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