It seems you are using explicit multiplication in your examples (i.e. you require A * B, rather than A B ).
In that case why not simply use the i suffix directly following the value as in
myComplex = 12 + 6i
or
myOtherComplex = 12/7 + (6 * pi)i
Then you may need to decide about i or j, I've seen both...
This i-suffix trick is not unlike the scientific notication and is e (3.1415e7 for example)
Edit (following David's comments)
The format above can become confusing, depending on the audience, one way to clarify this may be to only allow for imaginary literals, and to include these into a complex notation derived from your existing vector notation. When imaginary numbers or complex number require an expression to designate them, the syntax would require the explicit "function-looking" syntax such as Imaginary(i) and Complex(r, i).
Parsing rules:
- Any number (signed or unsigned, integer or decimal, or even exp. notation number) directly followed by the suffix i is a imaginary number: -7i or 1.23i or 5.76e4i but not 12 i (no space allowed between number and suffix)
- a two values vector with the first one real and the 2nd imaginary is a complex: (1, 7i) or even (7, 0i)
- Imaginary(i) format is used when "i" value is an expression. i is expressed without the i suffix which is implied by the method call syntax.
- Complex(r,i) format is used when either "r" or "i" params is/are an expression, and also whenever we wish to avoid ambiguity.
In short:
- (7, 1i) , (0, -3.1415i), (13, 0i), Complex(13, 0) or Complex(7x+3, sin(y)+2) are all complex numbers
- 6i, -1.234e5i, Imaginary(1.234) or Imaginary(sqrt(19x+5y)) are all imaginary numbers
- (12, 23, 34) is a vector in R^3
- (12i, -2i) in a vector in I^2 (not a complex number, since the first element is not real)
- ((0,0i), (1,-9.2i), (12, 0i)) or ((0, 21i), Complex(12,3), (44, -55i)) are vectors in C^3
That's seems consistent and simple enough, but then again, only the true end-users can tell.