iquo (or intDiv) returns the integer quotient q of the
Euclidean division of two integers a and b given as arguments.
(a=b*q+r with 0≤ r< b).
For Gaussian integers, we choose q so that b*q is as near by a as
possible and it can be proved that r may be chosen so that
|r|2 ≤ |b|2/2.
Input :
Output :
iquo works with integers or with Gaussian integers.
Input :
Output :
Input :
Output :
Here a−b*q=−4+i and |−4+i|2=17<|5+7*i|2/2=74/2=37