LLDIV(3) NEWLIB LLDIV(3)NAME
2.22 `lldiv'--divide two long long integers
SYNOPSIS
#include <stdlib.h>
lldiv_t lldiv(long long N, long long D);
DESCRIPTION
Divide N/D, returning quotient and remainder as two long long integers
in a structure `lldiv_t'.
RETURNS
The result is represented with the structure
typedef struct
{
long long quot;
long long rem;
} lldiv_t;
where the `quot' field represents the quotient, and `rem' the
remainder. For nonzero D, if ``R = ldiv(N,D);'' then N equals ``R.rem
+ D*R.quot''.
To divide `long' rather than `long long' values, use the similar
function `ldiv'.
PORTABILITY
`lldiv' is ISO 9899 (C99) compatable.
No supporting OS subroutines are required.
SEE ALSOlldiv is part of the library. The full documentation for is maintained
as a Texinfo manual. If info and are properly installed at your site,
the command
info
will give you access to the complete manual.
NEWLIB April 2010 LLDIV(3)