# The integer Euclidean quotient: iquo intDiv div

### 5.5.8 The integer Euclidean quotient: iquo intDiv div

The quotient and remainder of ordinary integers a and b are respectively integers q and r, where a=b*q+r and 0 ≤ r < b.

The quotient and remainder of Gaussian integers a and b are respectively Gaussian integers q and r where r=a−b*q is as small as possible. It can be proven that r can be found so that |r|2 ≤ |b|2/2.

The iquo command finds the integer quotient of two integers.
intDiv is a synonym for iquo.

- iquo takes two arguments:
  a and b, integers.
- iquo(a,b) returns the quotient q of a and b.

#### Examples.

- Input:
  iquo(148,5)
  Output:

  29

- Input:
  iquo(factorial(148),factorial(145)+2 )
  Output:

  3176375

- Input:
  iquo(25+12*i,5+7*i)
  Output:

  3−2 i

  Here r=a−b*q=−4+i and |−4+i|2=17<|5+7*i|2/2=74/2=37

The div operator is the infixed version of iquo.

#### Example.

Input:

148 div 5

Output:

29