Undergrad Simplest self-contained numeral system for complex numbers?

Click For Summary
The discussion centers on identifying the simplest self-contained numeral system for complex numbers, with suggestions including quarter-imaginary base and interleaved two's complement binary. Participants debate the definition of "simple," with some arguing that balanced ternary or other systems may be simpler than quarter-imaginary due to compactness. The interleaved binary system is highlighted for its efficiency in representing complex numbers while allowing easy conversion between formats. Overall, the conversation explores various numeral systems and their complexities in representing complex numbers effectively.
cuallito
Messages
94
Reaction score
1
TL;DR
Like balanced ternary for complex numbers.
Anyone know what the simplest possible self-contained numeral system for complex numbers would be, analogous to signed ternary for integers? My guess would be quarter-imaginary base (https://en.wikipedia.org/wiki/Quater-imaginary_base.)
 
Mathematics news on Phys.org
Define "simple". You can use a+ib where a and b follow your favorite simple representation of real numbers. I would consider that simpler than the quarter-imaginary base. You can convert between these two relatively easily, as the quarter-imaginary base has purely imaginary and purely real digits that you can separate.
 
  • Like
Likes pbuk and sysprog
Here's how it's commonly done in PL/1 (from https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ceea300/ceea30016.htm):

COMPLEX8Short floating-point complex hex number: an 8-byte complex number, whose real and imaginary parts are each 4-byte single-precision floating-point numbersCOMPLEX FLOAT DECIMAL (6)
COMPLEX16Long floating-point complex hex number: a 16-byte complex number, whose real and imaginary parts are each 8-byte double-precision floating-point numbersCOMPLEX FLOAT DECIMAL (16)
COMPLEX32Extended floating-point hex number: a 32-byte complex number, whose real and imaginary parts are each 16-byte extended-precision floating-point numbersCOMPLEX FLOAT DECIMAL (33)
 
  • Like
Likes Delta2
cuallito said:
Anyone know what the simplest possible self-contained numeral system for complex numbers would be, analogous to signed ternary for integers? My guess would be quarter-imaginary base (https://en.wikipedia.org/wiki/Quater-imaginary_base.)
I assume by signed ternary you are referring to what is more commonly called balanced ternary?
mfb said:
Define "simple".
Indeed. I think it is hard to come up with a definition in which balanced ternary is judged simpler than, say, 2's complement binary.

Quater-imaginary is an interesting curiosity, but again it is difficult to see it as 'simple', and it lacks the desirable feature of compactness that other representation systems (including balanced ternary) have. By compactness for Gaussian integers I mean that the set of all values which can be expressed by a string of ## n ## symbols of a system with ## m ## symbols should lie in a square with sides ## m^{n/2} ## on the Gaussian plane.

In my view, the simplest such system can be achieved by interleaved two's complement binary digits: ## ...b_2a_2b_1a_1b_0a_0 ## where ## z = a +ib ##. In this system we have (using the notation 0bxx to represent 2's complement binary):
Code:
0000 => 0 + 0i = 0
0001 => 1 + 0i = 1
0010 => 0 + 1i = i
0011 => 1 + 1i = 1 + i
0100 => 0b10 + 0i = -2
0101 => 0b11 + 0i = -1
0111 => 0b11 + 1i = -1 + i
...
and so all numbers represented by the 16 possible strings lie in the rectangle with corners at (-2, -2) and (1, 1).
mfb said:
You can convert between these two relatively easily.
## 7_{10} = ?_{2i} ##? (show your workings) :-p
 
Last edited:
  • Like
Likes sysprog
pbuk said:
## 7_{10} = ?_{2i} ##? (show your workings) :-p
The imaginary part is 0 and there is no fractional part, so we already know the result will be ?0?0?. From here on everything is working with real numbers only.
We just need to express 7 in base -4, which is awkward but possible: 16 = 100-4, 8 = 120-4, 7 = 133-4, which means our final result is 103032i. Most of the work went into base 10 -> base -4 conversion, not into anything that would be related to imaginary numbers.
If you know real and imaginary part separately you can keep them separate, and only merge them for the final result. That's similar to the interleaved binary system you showed. A bit more complicated because the imaginary part has an offset (2i and 1/2i digits, no 1i digit).
 
  • Like
Likes sysprog and pbuk
I think we have different concepts of 'relatively easy' @mfb :wink:
 
  • Like
Likes sysprog
It's much easier than base ##1+i## or even more obscure angles like ##1+2i##.
 
  • Like
Likes sysprog
mfb said:
Define "simple". You can use a+ib where a and b follow your favorite simple representation of real numbers. I would consider that simpler than the quarter-imaginary base. You can convert between these two relatively easily, as the quarter-imaginary base has purely imaginary and purely real digits that you can separate.
If the symmetry of balanced ternary is attractive then one could extend it to the complex numbers by using base 3 with nine complex digits: (-1-i), (-1), (-1+i), (-i), (0), (+i), (1-i), (1), (1+i). This is a bit unsatisfactory since it is obviously just a cheesy way of taking the balanced ternary expansions a and b of (a+bi) and interleaving their digits.

If the economy of digits of base -2 is attractive then one could use base ##i \sqrt 2## with two digits: 0 and 1.
 
  • Like
Likes pbuk
jbriggs444 said:
If the economy of digits of base -2 is attractive then one could use base ##i \sqrt 2## with two digits: 0 and 1.
Great idea - and to make it really simple you could implement the arithmetic routines in a symbolically economical language like brainf**k :wink:
 
  • Haha
Likes sysprog

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 41 ·
2
Replies
41
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 33 ·
2
Replies
33
Views
8K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K