Performs division of intmax_t type to obtain the quotient and remainder
imaxdiv_t __far imaxdiv(intmax_t numer, intmax_t denom); (C99)
The structure holding the result of the division is returned. When divided by 0, -1 is set as quotient quot and numer is set as remainder rem.
This function is used to divide a value of intmax_t type.
This function calculates the quotient (quot) and remainder (rem) resulting from dividing numerator numer by denominator denom, and stores these two integers as the members of the following structure imaxdiv_t.
When the value cannot be divided, the quotient of the result becomes an integer that is closest to the algebraical quotient and has a smaller absolute value than it.