User:TakuyaMurata/Meta-complex number

''This page has been listed on Votes for deletion. Please see that page for justifications and discussion.''

Meta-complex numbers are like complex numbers, but instead of 1 complex number with 2 parts each a real number in part, it is a meta-complex number where each part and sub-part can be a real number or another meta-complex number.

So, for example you can have numbers like this: 0,0],[0,1 or even like [6,0],[0,-6,-1,3],[2,4]

The addition, subtraction, and multiplication operations for meta-complex numbers are the same as complex numbers. This way of specifying it makes commutative multiplying still work, as in hypercomplex it does not work.

Here are functions in AKYTI format (similar to programs for TI-92 calculator, but uses computer keyboard characters)

:Func :Local nn1n,nn2n,nn3 :nn1+nn2 @Store(nn3) :If getType(nn3)="NUM":Return nn1+nn2 :If getType(nn1)="NUM":"{"&string(nn1)&",0}" @Store(nn1) :If getType(nn2)="NUM":"{"&string(nn2)&",0}" @Store(nn2) :expr(nn1) @Store(nn1n) :expr(nn2) @Store(nn2n) :Return string({cadd(nn1n[1],nn2n[1]),cadd(nn1n[2],nn2n[2])}) :EndFunc

:Func :Local nn1n,nn2n,nn3 :nn1-nn2 @Store(nn3) :If getType(nn3)="NUM":Return nn1-nn2 :If getType(nn1)="NUM":"{"&string(nn1)&",0}" @Store(nn1) :If getType(nn2)="NUM":"{"&string(nn2)&",0}" @Store(nn2) :expr(nn1) @Store(nn1n) :expr(nn2) @Store(nn2n) :Return string({csub(nn1n[1],nn2n[1]),csub(nn1n[2],nn2n[2])}) :EndFunc

:Func :Local nn1n,nn2n,nn3 :nn1*nn2 @Store(nn3) :If getType(nn3)="NUM":Return nn1*nn2 :If getType(nn1)="NUM":"{"&string(nn1)&",0}" @Store(nn1) :If getType(nn2)="NUM":"{"&string(nn2)&",0}" @Store(nn2) :expr(nn1) @Store(nn1n) :expr(nn2) @Store(nn2n) :Return string({csub(cmul(nn1n[1],nn2n[1]),cmul(nn1n[2],nn2n[2])),cadd(cmul(nn1n[1],nn2n[2]),cmul(nn1n[2],nn2n[1]))}) :EndFunc