Chapter 2. Basic Operations
JMathLib understands the basic operators +,-,*,/,^ and !.
> 2+3
5.0
> 5!
120.0
> 2*3
6.0
> 2^3
8.0
> 2/3
0.6666666666666666
The operators work in the following order
^
* /
+ -
!
This can be modified by using brackets
> 2+3*4
14.0
> (2+3)*4
20.0
> 2*3^2
18.0
> (2*3)^2
36.0
> 2^3!
40320.0
> 2^(3!)
64.0
> 2+3!
120.0
> 2+(3!)
8.0