Home | New |
Syntax | Math | Explanation |
---|---|---|
a+b, a-b
| a+b, a−b | Addition, subtraction. |
a*b, a/b
| a⋅b, a/b | Multiplication, division. |
a^n
| an | Exponentiation. |
n!
| n! | Factorial. |
abs(z)
| |z| | Absolute value. |
a:=b
| a:=b | Assignment. |
f(z):=2z
| f(z):=2z | Function definition. |
f(x,y):=x*y
| f(x,y):=x⋅y | Function definition. |
z.2z
| z ↦ 2z | Lambda expression. |
(x,y).x*y
| (x,y) ↦ x⋅y | Lambda expression. |
f'(a)
| f'(a) | Complex derivative of f at a. |
f''(a)
| f''(a) | Second derivative of f at a. |
if(a,x,y)
| x if a else y | Conditional expression. |
a&b
| a∧b | Conjunction: a and b. |
a|b
| a∨b | Disjunction: a or b. |
a<b, a>b
| a<b, a>b | Comparison. |
a<=b, a>=b
| a≤b, a≥b | Comparison. |
Function | Math | Explanation |
---|---|---|
diff(z.f(z),a)
| df(z)/dz|z=a | Complex derivative of f at a. |
diff(z.f(z),a,n)
| (d/dz)n f(z)|z=a | The n-th derivative of f at a. |
sum(a,b,k.f(k))
| ∑k∈[a,b] f(k) | Sum. |
prod(a,b,k.f(k))
| ∏k∈[a,b] f(k) | Product. |
int([a,b],z.f(z))
| ∫γ f(z) dz | Path integral, γ=line segment [a,b]. |
int([a,b,c],z.f(z))
| ∫γ f(z) dz | Path integral, γ=[a,b]⊕[b,c]. |
int(p,z.f(z))
| ∫γ f(z) dz | Path integral, γ=[p0,p1]⊕[p1,p2]⊕… |
pow(f,n,z)
| fn(z) | The n-th iterate of f. |
Constant | Explanation |
---|---|
pi
| Half length of the unit circle. |
tau
| Length of the unit circle. |
e
| Base of the natural logarithm. |
deg
| Degree unit: tau/360 .
|
gon
| Gradian unit: tau/400 .
|
gc
| Euler-Mascheroni constant (gamma constant). |
nan
| Not a number. |
Function | Explanation |
---|---|
abs(z)
| Absolute value. |
sgn(z)
| Signum, i.e. abs(z)/z .
|
floor(z)
| Re,Im: rounded towards minus infinity. |
ceil(z)
| Re,Im: rounded towards plus infinity. |
rd(z)
| Re,Im: rounded towards zero. |
frac(z)
| Re,Im: fractional part. |
Function | Explanation | ||||
---|---|---|---|---|---|
exp(z)
| Natural exponential function. | ||||
ln(z)
| Natural logarithm. | ||||
lg(z)
| Common logarithm. | ||||
ld(z)
| Binary logarithm. | ||||
lb(z)
| Binary logarithm. | ||||
log(z,b)
|
Function | Explanation |
---|---|
sin(z), cos(z), tan(z),
| Trigonometric functions. |
asin(z), acos(z),
| Inverse trigonometric functions. |
sinh(z), cosh(z),
| Hyperbolic functions. |
asinh(z), acosh(z),
| Inverse hyperbolic functions. |
sinc(z)
| Cardinal sine: sin(pi*z)/(pi*z) .
|
Function | Explanation |
---|---|
gamma(z)
| Gamma function Γ(z). |
fac(z)
| Factorial function, i.e. gamma(z+1) .
|
Function | Explanation |
---|---|
rand()
| Random number from interval [0,1]. |
rand(a,b)
| Random number from interval [a,b]. |
rand(a)
| Randomly pick an element from list a. |
rand(a:b)
| Randomly pick an element from [a,a+1,a+2,...,b]. |
rand(a:b:d)
| Randomly pick an element from [a,a+d,a+2d,...,b]. |
map(f,a)
| Apply f to every element of list a.
Example: map(x.2x,1:10) .
|
filter(p,a)
| The elements x in a that fulfill the predicate p.
Example: filter(k.mod(k,2)=1,1:10) .
|