Implementation of tessarines in Mathematica

  • Mathematica
  • Thread starter Anixx
  • Start date
  • Tags
    Mathematica
  • #1
80
12
Hello, guys!

I just wanted to share that there is a way to easily implement split-complex numbers (and tessarines) in Mathematica.

Code:
$Pre = If[FreeQ[#, J], #, Module[{tmp},
       
     tmp = Evaluate[
        MatrixFunction[Function[J, #], {{0, 1}, {1, 0}}]] //
       FullSimplify;
           tmp /. {{a_, b_}, {b_, a_}} -> a + J b]] &;

After this code you can use split-complex unity J in any functions. I recommend to try
Code:
J^I
I^J
J^J
Log[J]
Sqrt[J]
Gamma[J + 2]
Zeta[J + 1]
PolyGamma[J + 2]
Exp[J]
(-1)^J
2^J

Have fun!
 
  • #2
A similar code implementing dual numbers (dual unity Eps):

Code:
$Pre = If[FreeQ[#, Eps], #,
    Module[{tmp},
     tmp = Evaluate[
        MatrixFunction[Function[Eps, #], {{0, 0}, {1, 0}}]] //
       FullSimplify;
     tmp /. {{a_, b_}, {0, a_}} -> a + Eps b /. {{a_, 0}, {b_, a_}} ->
        a + Eps b]] &;
 

Suggested for: Implementation of tessarines in Mathematica

Replies
1
Views
436
Replies
1
Views
685
Replies
1
Views
881
Replies
2
Views
924
Replies
1
Views
769
Replies
6
Views
901
Replies
1
Views
605
Back
Top