Operators
All common arithmetic operators are supported. Boolean operators are
also fully supported. Boolean expressions are evaluated to be either
1 or 0 (true or false respectively).
An
indicates that the operator can be used with the specific type of variable.
Refer to the grammar for detailed information
about operator precedence.
|
|
Double |
Complex |
String |
Vector |
Power |
^ |
 |
 |
|
|
Boolean Not |
! |
 |
|
|
|
Unary Plus, Unary Minus |
+x, -x |
 |
 |
|
|
Modulus |
% |
 |
|
|
|
Division |
/ |
 |
 |
|
 |
Multiplication |
* |
 |
 |
|
 |
Addition, Subtraction |
+, - |
 |
 |
(only +) |
|
Less or Equal, More or Equal |
<=, >= |
 |
|
|
|
Less Than, Greater Than |
<, > |
 |
|
|
|
Not Equal, Equal |
!=, == |
 |
 |
 |
|
Boolean And |
&& |
 |
|
|
|
Boolean Or |
|| |
 |
|
|
|
Functions
Note that you can always add new functions as described in the documentation.
Each of the following functions can be applied to objects of the types
indicated.
Functions added with addStandardFunctions():
|
|
Double |
Complex |
String |
Vector |
Sine |
sin() |
 |
 |
|
|
Cosine |
cos() |
 |
 |
|
|
Tangent |
tan() |
 |
 |
|
|
Arc Sine |
asin() |
 |
 |
|
|
Arc Cosine |
acos() |
 |
 |
|
|
Arc Tangent |
atan() |
 |
 |
|
|
Hyperbolic Sine |
sinh() |
 |
 |
|
|
Hyperbolic Cosine |
cosh() |
 |
 |
|
|
Hyperbolic Tangent |
tanh() |
 |
 |
|
|
Inverse Hyperbolic Sine |
asinh() |
 |
 |
|
|
Inverse Hyperbolic Cosine |
acosh() |
 |
 |
|
|
Inverse Hyperbolic Tangent |
atanh() |
 |
 |
|
|
Natural Logarithm |
ln() |
 |
 |
|
|
Logarithm base 10 |
log() |
 |
 |
|
|
Angle |
angle() |
 |
|
|
|
Absolute Value / Magnitude |
abs() |
 |
 |
|
|
Random number (between 0 and 1) |
rand() |
|
|
|
|
Modulus |
mod() |
 |
|
|
|
Square Root |
sqrt() |
 |
 |
|
|
Sum |
sum() |
 |
|
|
|
Functions added with addComplex():
|
|
Double |
Complex |
String |
Vector |
Real Component |
re() |
|
 |
|
|
Imaginary Component |
im() |
|
 |
|
|
|