Factorization of Gaussian integers
This functionality does not run in MATLAB.
numlib::factorGaussInt(n) returns the factorization of the Gaussian integer n into Gaussian primes. Among associate primes, that one with smallest polar angle is chosen.
In the Gaussian integers, 3 remains prime while 5 does not:
The argument to numlib::factorGaussInt may be any Gaussian integer, that is, every complex number of the form a + b i where a and b are integers:
numlib::factorGaussInt returns a list [u, p1, a1, ..., pk, ak] where u is a unit in the Gaussian integers, the pi are Gaussian primes and the ai are positive integers, such that .
The function ifactor is used to factor the norm; this step takes most of the running time. Hence, the running time of the algorithm mainly depends on the size of the prime factors of the norm of n.