Number bases part 9: Imaginary bases

Untitled Diagram
So it’s been a while since I mentioned number bases. So here it is: imaginary numbers as bases.

Note: this conversion method works only for purely imaginary values. Complex values are a completely different story. Additionally, in order to understand how to use imaginary numbers as bases, you first need to understand negative numbers as bases. Why? Because if you square an imaginary number, you can get a negative number. You should review negative bases, which is here. And this is the beginning of all this number base stuff.

So once you’ve reviewed negative bases, let’s take a look. Imaginary bases can represent any complex value without a negative sign and without the i signifier. How? Like negative bases, there’s no negative sign needed, as it’s contained within the base. Here, the sign is within the rules of i and i is contained in the base.

Donald Kunth published a short article in 1960 titled “An Imaginary Number System”, wherein he describes base 2i which he calls “quater-imaginary” as it requires four digits to represent. The diagram above is a recreation of figure 1 from his paper that is part of the conversion method (but without the details).

The general idea is this: take your number, convert the real part into base negative four; divide the imaginary part by two then convert that result into the same base. Interweave the resulting values together such that the real result takes the even power positions and the imaginary result takes the odd power positions.

From this, I extended this to any imaginary number (|base| > 1), using the paper that described negative bases. But first, why four digits? Well you can think of imaginary numbers as two dimensional, say numbers that describe a position on a plane (perhaps planar numbers?). This two dimensionality requires one to square the starting base to have sufficient digits to represent itself.

So extending this method to convert a number z=x+yi to any imaginary base b, find the effective negative base eB, which is _{e}B = -|b^2|. This is the negative base in which you convert the parts to separately. (a negative non-integer base v will use \left \lceil -v \right \rceil digits). Now, convert the real part of your number z (x) to base eB. Next, take the imaginary part of your number z (y) and convert y/Im(b) to base eB. If your base is 7i, convert y/7 to base -49; If your base is -3.14i, convert y/-3.14 to base -9.8596 (using ten characters). That’s right, there’s a division.

Finally, interweave the converted parts. This is best explained with an example.

Say you have the value 1234 + 5678i and wish to convert it to base 3i. The effective base is -9; 1234 in that base is 18771. 5678 / 3 is 1892.\overline{6} which in base -9 is 17663.3. These are then woven together like so: 1178676731.3. The real part took the even power positions and the imaginary part took the odd power positions.

Conversion back is the definition of a base: \sum c_ib^i

1178676731.3_{3i}=
1(3i)^9 + 1(3i)^8 + 7(3i)^7 + 8(3i)^6 + 6(3i)^5 + 7(3i)^4 + 6(3i)^3 + 7(3i)^2 + 3(3i) + 1 + 3(3i)^{-1} =
1(19683i) + 1(6561) + 7(-2187i) + 8(-729) + 6(243i) + 7(81) + 6(-27i) + 7(-9) + 3(3i) + 1(1) + 3(-0.\overline{3}i) =
1234+5678i

Real soon, the python module for all of this.

Tagged with:
Posted in Number Bases

Leave a comment

In Archive
Design a site like this with WordPress.com
Get started