# Operators

## Built in 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.

Operators | | **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 custom functions. Each of the following functions can be applied to objects of the types indicated.

Functions added with **addStandardFunctions()**:

Operator | Notation | **Double** | **Complex** | **String** | **Vector** |

Sine | sin(x) | | | Â | Â |

Cosine | cos(x) | | | Â | Â |

Tangent | tan(x) | | | Â | Â |

Arc Sine | asin(x) | | | Â | Â |

Arc Cosine | acos(x) | | | Â | Â |

Arc Tangent | atan(x) | | | Â | Â |

Arc Tangent (with 2 parameters) | atan2(y, x) | | Â | Â | Â |

Hyperbolic Sine | sinh(x) | | | Â | Â |

Hyperbolic Cosine | cosh(x) | | | Â | Â |

Hyperbolic Tangent | tanh(x) | | | Â | Â |

Inverse Hyperbolic Sine | asinh(x) | | | Â | Â |

Inverse Hyperbolic Cosine | acosh(x) | | | Â | Â |

Inverse Hyperbolic Tangent | atanh(x) | | | Â | Â |

Natural Logarithm | ln(x) | | | Â | Â |

Logarithm base 10 | log(x) | | | Â | Â |

Exponential (e^x) | exp(x) | | | Â | Â |

Absolute Value / Magnitude | abs(x) | | | Â | Â |

Random number (between 0 and 1) | rand() | Â | Â | Â | Â |

Modulus | mod(x,y) = x % y | | Â | Â | Â |

Square Root | sqrt(x) | | | Â | Â |

Sum | sum(x,y,z) | | | | Â |

If | if(cond,trueval,falseval) | | Â | Â | Â |

Str (number to string) | str(x) | | | | |

Binomial coefficients | binom(n,i) | Integer values | | | |

Functions added with **addComplex()**:

Â | Â | **Double** | **Complex** | **String** | **Vector** |

Real Component | re© | | | Â | Â |

Imaginary Component | im© | | | Â | Â |

Complex Modulus (Absolute Value) | cmod© | | | Â | Â |

Argument (Angle of complex value, in radians) | arg© | | | Â | Â |

Complex conjugate | conj© | | | Â | Â |

Complex, constructs a complex number from real and imaginar parts | complex(x,y) | | Â | Â | Â |

Polar, constructs a complex number from modulus and argument | polar(r,theta) | | Â | Â | Â |