You are a guest. Restricted access. Read more.


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 Check indicates that the operator can be used with the specific type of variable. Refer to the grammar for detailed information about operator precedence.

Operators DoubleComplexStringVector
Power^ Check Check    
Boolean Not! Check      
Unary Plus, Unary Minus+x, -x Check Check    
Modulus% Check      
Division/ Check Check   Check
Multiplication* Check Check   Check
Addition, Subtraction+, - Check Check Check (only +)  
Less or Equal, More or Equal⇐, >= Check      
Less Than, Greater Than<, > Check      
Not Equal, Equal!=, == Check Check Check  
Boolean And&& Check      
Boolean Or|| Check      


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 DoubleComplexStringVector
Sinesin(x) Check Check    
Cosinecos(x) Check Check    
Tangenttan(x) Check Check    
Arc Sineasin(x) Check Check    
Arc Cosineacos(x) Check Check    
Arc Tangentatan(x) Check Check    
Arc Tangent (with 2 parameters)atan2(y, x) Check      
Hyperbolic Sinesinh(x) Check Check    
Hyperbolic Cosinecosh(x) Check Check    
Hyperbolic Tangenttanh(x) Check Check    
Inverse Hyperbolic Sineasinh(x) Check Check    
Inverse Hyperbolic Cosineacosh(x) Check Check    
Inverse Hyperbolic Tangentatanh(x) Check Check    
Natural Logarithmln(x) Check Check    
Logarithm base 10log(x) Check Check    
Exponential (e^x)exp(x) Check Check    
Absolute Value / Magnitudeabs(x) Check Check    
Random number (between 0 and 1)rand()        
Modulusmod(x,y) = x % y Check      
Square Rootsqrt(x) Check Check    
Sumsum(x,y,z) Check Check Check  
Ifif(cond,trueval,falseval) Check      
Str (number to string)str(x) Check Check Check Check
Binomial coefficientsbinom(n,i) Integer values

Functions added with addComplex():

Real Componentre© Check Check    
Imaginary Componentim© Check Check    
Complex Modulus (Absolute Value)cmod© Check Check    
Argument (Angle of complex value, in radians)arg© Check Check    
Complex conjugateconj© Check Check    
Complex, constructs a complex number from real and imaginar partscomplex(x,y) Check      
Polar, constructs a complex number from modulus and argumentpolar(r,theta) Check