Unofficial GANJA Manual - cloudcell/ganja.js GitHub Wiki
Mathematical Expression Conventions
GANJA has an internal parser that can handle (in most cases) 4 different ways of expressing the same operation. The easiest way to write mathematical expressions is to use Inline JavaScript. According to internal documentation within ganja.js, AsciiMath convention might be used only if the formula is passed as a string.
| Precedence | Inline JavaScript | AsciiMath | Object Oriented | Functional | Notes |
|---|---|---|---|---|---|
| 5 | x.Involute | tilde(x) | x.Involute | A.Involute(x) | |
| 5 | x.Reverse | ddot(x) | x.Reverse | A.Reverse(x) | |
| 5 | ~x | hat(x) | x.Conjugate | A.Conjugate(x) | |
| 5 | x.UnDual | A.UnDual(x) | the inverse of Dual(x) | ||
| 5 | !x | bar(x) | x.Dual | A.Dual(x) | |
| 4 right-to-left | x**-1 | x^-1 | x.Inverse | A.Inverse(x) | |
| 4 right-to-left | x**y | x^y | x.Pow(y) | A.Pow(x,y) | |
| 3 | x^y | x^^y | x.Wedge(y) | A.Wedge(x,y) | |
| 3 | x<<y | x*y | x.Dot(y) | A.Dot(x,y) | |
| 3 | x&y | bar(bar(x)^^bar(y)) | x.Vee(y) | A.Vee(x,y) | |
| 3 | x>>>y | x ** y ** hat(x) | x.Mul(y).Mul(x.Conjugate) | A.sw(x,y) | Sandwich Operator (for all sandwitch-like operations) |
| 2 | x*y | x**y | x.Mul(y) | A.Mul(x,y) | Geometric Product |
| 2 | x/y | x/y | x.Div(y) | A.Div(x,y) | |
| 1 | x-y | x-y | x.Sub(y) | A.Sub(x,y) | |
| 1 | x+y | x+y | x.Add(y) | A.Add(x,y) | |
| 1e1 | 1e_1 | new A([0,1]) | A.Vector(1) | ||
| 2e2 | 2e_2 | new A([0,0,2,0]) | A.Vector(0,2) | ||
| 2e12 | 2e_12 | new A([0,0,0,2]) | A.Bivector(2) |
Source: the original README file
My suggestion is to always use the inline JavaScript convention as it is the most compact.
Symbolic Calculators to Play with Expressions and Check Yourself
Please click here to be redirected to the 3D GA calculator.
This is what you should see:

Click on the "List of variables" link to see what variables are available for testing mathematical expressions and what values those variables hold.
Please click here to be redirected to the 2D GA calculator.
This is what you should see:
