numlib::factorGaussInt

Factorization of Gaussian integers

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

numlib::factorGaussInt(n)

Description

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.

Examples

Example 1

In the Gaussian integers, 3 remains prime while 5 does not:

numlib::factorGaussInt(3), numlib::factorGaussInt(5)

Example 2

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(2+2*I)

Parameters

n

An integer, or a complex number whose real and imaginary part are integers

Return Values

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 .

Algorithms

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.

See Also

MuPAD Functions

Was this topic helpful?