Main
Home
Quick tour
Handbook
Docs
Mailing Lists
Demonstration
Download
Sourceforge project
FAQ
Links


Toolboxes
Char
Control
Crypto
Deprecated
Engine
Finance
FunFun
General
Graphics 3D
Graphics
Image
Integration
InputOutput
JMathLib
LinearAlgebra
Matrix
Miscellaneous
Net
Polynomial
Set
Signal
SpecFun
SpecialMatrix
Statistics
String
System
Time
Trigonometric
UserInterface
...


Contact
Developers

JMathLib
A Java Clone of Octave, SciLab, Freemat and Matlab.

[Index] [Documentation] [Demonstration] [Download]

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

Last modified
sourceforge