div(3C)div(3C)NAMEdiv(), ldiv(), lldiv(), imaxdiv() - integer division and remainder
SYNOPSISDESCRIPTION
Computes the quotient and remainder of the division of the numerator
numer by the denominator denom. If the division is
inexact, the sign of the resulting quotient is that of
the algebraic quotient, and the magnitude of the result‐
ing quotient is the largest integer less than the magni‐
tude of the algebraic quotient. If the result can be
represented, the result is returned in a structure of
type (defined in having members quot and rem for the
quotient and remainder respectively. Both members have
type and values such that quot denom rem numer. If the
result cannot be represented, the behavior is undefined.
Similar to except that the arguments each have type and the result
is returned in a structure of type (defined in having
members quot and rem for the quotient and remainder
respectively.
Similar to except that the arguments each have type and the result
is returned in a structure of type (defined in having
members quot and rem for the quotient and remainder
respectively.
Similar to except that the arguments each have type and the result
is returned in a structure of type (defined in having
members quot and rem for the quotient and remainder
respectively.
WARNINGS
Behavior is undefined if denom is zero.
SEE ALSOfloor(3M), thread_safety(5).
STANDARDS CONFORMANCEdiv(3C)