imaxdiv method

imaxdiv_t imaxdiv(
  1. intmax_t numer,
  2. intmax_t denom
)

Computes both the quotient and remainder of the division of numer by denom.

Implementation

imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom) {
  return imaxdiv_t(numer ~/ denom, numer % denom);
}