|
|
Operators
Arithmetic Operators
|
+
|
Addition
|
|
-
|
Subtraction
|
|
*
|
Multiplication
|
|
/
|
Division
|
Relational Operators
|
>
|
Greater than
|
|
<
|
Less than
|
|
>=
|
Greater than or equal
|
|
<=
|
Less than or equal
|
|
==
|
Equal to
|
|
!=
|
Not equal to
|
Logical Operators
Bitwise operators
|
|
|
Or
|
|
&
|
And
|
|
^
|
Exclusive or
|
|
~
|
Not
|
Special Operators
|
=
|
Assignment operator.
Propagates value to the left, can be concatenated (e.g. a=b=c=0)
|
|
,
|
Separates
subexpressions. Result of the combined expression is the result of the rightmost expression
|
|
Ex1 ? Ex2 : Ex3
|
Conditional evaluation. If (Ex1 !=0) then return Ex2, else return Ex3
|
Unary Functions
Functions which take one argument. In the following list this argument is called a.
Standard Functions
|
abs
|
Returns the absolute value of the argument
|
|
floor
|
Returns the largest integer <= a
|
|
ceil
|
Returns the smallest integer >= a
|
|
sin
|
Sine
|
|
cos
|
Cosine
|
|
tan
|
Tangent
|
|
asin
|
Arcsine
|
|
acos
|
Arccosine
|
|
atan
|
Arctangent
|
|
exp
|
Exponential
|
|
log
|
Natural logarithm
|
|
pow10
|
10 raised to the power of a
|
|
log10
|
Decadic logarithm
|
|
square
|
a * a
|
|
sqrt
|
Square root
|
|
si
|
sin(a) / a
|
|
inv
|
1 / a
|
Hyperbolic Functions
|
sinh
|
Hyperbolic sine
|
|
cosh
|
Hyperbolic cosine
|
|
tanh
|
Hyperbolic tangent
|
|
coth
|
Hyperbolic cotangent
|
|
sech
|
Hyperbolic secans
|
|
cosech
|
Hyperbolic cosecans
|
|
arsinh
|
Inverse hyperbolic sine
|
|
arcosh
|
Inverse hyperbolic cosine
|
|
artanh
|
Inverse hyperbolic tangent
|
|
arcoth
|
Inverse hyperbolic cotangent
|
Special Functions
|
fac
|
Factorial
|
|
gamma
|
Gamma function
|
|
erf
|
Gaussian error function
|
|
srand
|
Sets seed for rand
|
Binary Functions
Functions which take two arguments. In the following list these argument are called a and b.
Standard Functions
|
pow
|
a raised to the power of b
|
|
root
|
a-th root of b
|
|
mod
|
a modulo b
|
Special Functions
|
binom
|
The binomial coefficient
|
|
beta
|
Beta function
|
|
rand
|
Random number between a and b
|
Functions with a variable number of arguments
In the following list these argument are called a,b, etc. Ellipses (...) symbolize an arbitrary number of
arguments, which follow the required arguments.
Examples: ... symbolizes a variable argument list with zero or more arguments.
a,... symbolizes a variable argument list with one required argument. a,b,... symbolizes a variable argument list with two required argument.
In the following list the number of required arguments is given in parentheses.
Standard Functions
|
max (2)
|
The largest number in a,b,...
|
|
min (2)
|
The smallest number in a,b,...
|
|
sum (1)
|
a + b + c + ...
|
|
mean (1)
|
Average sum (a,b,c,...) / N
|
|
poly (2)
|
Polynomial a + b*x + c*x^2 + d*x^3 + ...
|
Special Functions
|
stat (1)
|
Variance E( (X- E(X)) ^2)
|
|
std (1)
|
Standard deviation
|
Functions which take a function name as an argument
The signature of the following functions is a,b,F where F is the name of a unary function.
|
integrate
|
Integral of F() in [a,b]
|
|
solve
|
Find roots of equation F()=0 in [a,b]
|
|
minimize
|
Find minimum of F() in [a,b]
|
|
maximize
|
Find maximum of F() in [a,b]
|
|