Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

lldiv - division of integers (long long int)

&pagelevel(4)&pagelevel

Syntax

#include <stdlib.h>

lldiv_t lldiv(long long int dividend, long long int divisor);

Description lldiv() computes the quotient and remainder of the division of the numerator numer by

the denominator denom. Both the arguments and the result are of type long long int.

The sign of the quotient is the same as the sign of the algebraic quotient. The value of the
quotient is the highest integer less than or equal to the absolute value of the algebraic
quotient.

The remainder is expressed by the following equation:

Quotient * Divisor + Remainder = Dividend

Return val.

Structure of type lldiv_t,

if successful. The structure includes the quotient quot as well as the
remainder rem as long long values.

See also

div(), ldiv()