Index | iSight | Lab | SurfLab | MinLab | CMCLab | GANG


The Lab parser accepts Mathematica-style expressions like

2 + 3.54 cos[z]-3.1e+2 Sin[z]
2 pi+(3-2i)/(z^3+1)+exp[z-1]

The symbol * for multiplication is optional, functions are written with square brackets, and the parser is insensitive to case with regard to function names.

Functions supported by Lab include the following (for a complete list, see below):

  • arithmetic operations: +, -, *, /, ^;
  • exponential and logarithmic functions;
  • trigonometric and hyperbolic functions and their inverses.
  • elliptic theta functions, Weierstrass elliptic functions and Jacobi elliptic functions;

Complex Functions Supported by the Parser

Arithmetic and related functions: unary plus, unary minus, addition, subtraction, multiplication, division, exponentiation:

operation symbol alternate alternate
unitary plus +x   pos[x]
unitary negation -x   neg[x]
addition x+y   add[x,y]
subtraction x-y   sub[x,y]
multiplication x*y x y mul[x,y]
division x/y   div[x,y]
exponentiation x^y x**y pow[x,y]

Other arithmetic functions:

operation symbol alternate
square sqr[x] x*x;
cube cube[x] x*x*x;
multiplicative inverse inv[x] 1/x;
square root sqrt[x]  


constant symbol value
imaginary unit i  
circle constant pi 3.14159
base of natural logarithm e 2.71828
Catalan's constant cat 0.915966
Euler's constant euler 0.577216
golden ratio gold 1.61803

Real and imaginary parts, absolute value and norm:

function symbol alternate
real part re[x] real[x]
imaginary part im[x] imag[x]
square of absolute value norm[x]  
conjugate conj[x]  

Exponential and logarithmic functions:

function symbol
exp x exp[x]
natural logarithm log[x]
base 10 logarithm log10[x]
base y logarithm logb[x,y]

Trigonometric functions:

function symbol
cos x cos[x]
sin x sin[x]
tan x tan[x]
sec x sec[x]
csc x csc[x]
cot x cot[x].

Inverse trigonometric functions:

function symbol alternate
arccos x arccos[x] acos[x]
arcsin x arcsin[x] asin[x]
arctan x arctan[x] atan[x]
arcsec x arcsec[x] asec[x]
arccsc x arccsc[x] acsc[x]
arccot x arccot[x]. acot[x].

Hyperbolic functions:

function symbol
cosh x cosh[x]
sinh x sinh[x]
tanh x tanh[x]
sech x sech[x]
csch x csch[x]
coth x coth[x].

Inverse hyperbolic functions:

function symbol alternate
arccosh x arccosh[x] acosh[x]
arcsinh x arcsinh[x] asinh[x]
arctanh x arctanh[x] atanh[x]
arcsech x arcsech[x] asech[x]
arccsch x arccsch[x] acsch[x]
arccoth x arccoth[x] acoth[x].

Elliptic theta functions:

function symbol

Derivatives of elliptic theta functions. The number of appended p's is the order of the derivative with respect to the first argument.

function symbol

Weierstrass elliptic functions. The second argument is the the ratio of lattice generators (periods).

function symbol
Weierstrass P function. weierstrass_P[x,y]
first derivative of Weierstrass P function weierstrass_P_p[x,y]
Weierstrass zeta function weierstrass_zeta[x,y]
Weierstrass sigma function weierstrass_sigma[x,y]

Functions related to the Weierstrass elliptic functions:

function symbol

Complete elliptic integrals:

function symbol

Jacobi Elliptic functions:

function symbol
sn x jacobi_sn[x,y]
cn x jacobi_cn[x,y]
dn x jacobi_dn[x,y]
ns x jacobi_ns[x,y]
cs x jacobi_cs[x,y]
ds x jacobi_ds[x,y]
nc x jacobi_nc[x,y]
sc x jacobi_sc[x,y]
dc x jacobi_dc[x,y]
nd x jacobi_nd[x,y]
sd x jacobi_sd[x,y]
cd x jacobi_cd[x,y]

Functions related to the Jacobi Elliptic functions:

function symbol
am x jacobi_am[x,y].

Lab Guide GANG