clear all
; A semicolon is the line comment character.
; Equations are entered by just typing them in:
c^2=a^2+b^2 ; The Pythagorean Theorem.
c ; Solve for c.  Equations are solved by typing in the variable.
; "sign" variables are special variables and may only be +1 or -1.

code c ; Generate C code.

variables c ; Define all C variables for the above assignment statement.

code python ; Generate Python code.

b ; Solve for b.
; *************************************************************************
y=x^2+1/x^2
x ; solve for x
y ; solve for y to check the answer
simplify
; *************************************************************************
; Mathomatic is also handy as an advanced calculator:
2+3
2^.5 ; the square root of 2, rounded to 14 digits
; *************************************************************************
27^y=9
y ; solve for y
; *************************************************************************
3*x^2+2*x-5 = 27
x
simplify
calculate ; expand "sign" variables and approximate
