This program calculates the prime factorization of the given Gaussian integer. A Gaussian integer is a complex number of the form a + bi, where a and b are integers. This program has a limit of | a|, | b| < 226. If the number is large, the program may hang for a few seconds.
The factorization is put into the following canonical form:
If the number is 0, 1, −1, i, or −i, then the factorization is the number itself.
Otherwise the factorization begins with a factor of −1 or i or −i if necessary. The rest are primes listed in ascending order of absolute value, breaking ties by lowest argument (angle); each of these factors have absolute value > 1 and are in the first quadrant (0 ≤ argument < π/2).
The real or imaginary component can be suppressed, and they can be in either order. The 1 can be suppressed for i. For example, all these are valid inputs: -0, 5i, 1+2i, -i-2
Spaces are allowed anywhere in the Gaussian integer, except within a string of digits.
To indicate negative numbers, the ASCII hyphen-minus (U+002D) and the minus sign (U+2212) are both acceptable. (The output properly uses the minus sign, though.)
j is an acceptable synonym for i, for those electrical engineers out there.
« Back | Home | Login |
Register | Guestbook | Forum |
Chatroom | Upload Your Files | User Uploads |
Online Services | Search Files | Wapmaster |
Our Other Sites | Our Official Apps | Our Android Apps |