The Gaussian integers are the set of complex numbers with
integer coefficients,
i.e. numbers of the form
where
and
.
What is most interesting about the Gaussian integers is that
they form a Euclidean domain, i.e. they can be factored into primes,
and you can use the Euclidean algorithm to compute
the GCD of two Gaussian integers.
Given a Gaussian integer
let
be the norm of
.
Write a Maple procedure REM that computes the remainder
of two
non-zero Gausian integers
such that
where
.
Use your remainder routine to compute the GCD of two Gaussian integers.