; Equations are entered by just typing them in:
c^2=a^2+b^2 ; The Pythagorean theorem
; The entered equation becomes the current equation.
; The current equation can be solved by typing in a variable name:
c ; which is shorthand for the solve command.
; "sign" variables are special two-valued variables that may only be +1 or -1.
b ; Solve for variable "b".
; To output programming language code, use the code command:
code ; C language code is the default.
code java ; Mathomatic can also generate Java
code python ; and Python code.
; ********************************************************************
a=b+1/b ; Enter another equation.
solve verify b ; Solve for "b", plugging the result into the original equation to verify.
solve a ; Solve back for "a" and we should get the original equation.
simplify ; The simplify command makes expressions simpler and prettier.
; ********************************************************************
; Mathomatic is also handy as a calculator.
; Expressions without variables are instantly evaluated:
2+3
2^.5 ; the square root of 2, rounded to the default 14 digits:
; ********************************************************************
27^y=9 ; an example that uses numerical logarithms
solve verify y ; Solve for y, verifying the result.
; ********************************************************************
0=x^2+x ; A simple quadratic, to show how the calculate command works.
solve verify x ; Solve for x, verifying the result.
calculate ; expand "sign" variables and approximate