Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

maths

Subcommands

SubcommandDescriptionSyntax
eReturns Euler’s number (2.718281828459045)e()
piReturns the value of pi (3.141592653589793)pi()
sinCalculates the sine of a number in radianssin(<expr>)
cosCalculates the cosine of a number in radianscos(<expr>)
tanCalculates the tangent of a number in radianstan(<expr>)
sinhCalculates the hyperbolic sine of a number in radianssinh(<expr>)
coshCalculates the hyperbolic cosine of a number in radianscosh(<expr>)
tanhCalculates the hyperbolic tangent of a number in radianstanh(<expr>)
asinCalculates the arcsine of a number in radiansasin(<expr>)
acosCalculates the arccosine of a number in radiansacos(<expr>)
atanCalculates the arctangent of a number in radiansatan(<expr>)
asinhCalculates the inverse hyperbolic sine of a number in radiansasinh(<expr>)
acoshCalculates the inverse hyperbolic cosine of a number in radiansacosh(<expr>)
atanhCalculates the inverse hyperbolic tangent of a number in radiansatanh(<expr>)
expCalculates the base e exponential of a number (equivalent to e^x)exp(<expr>)
lnCalculates the natural logarithm (base e) of a numberln(<expr>)
sqrtCalculates the square root of a numbersqrt(<expr>)
absCalculates the absolute value of a numberabs(<expr>)
ceilCalculates the ceiling (next highest integer) of a numberceil(<expr>)
floorCalculates the floor (next lowest integer) of a numberfloor(<expr>)
logCalculates the logarithm of a number in the provided baselog(<expr>, <expr>)
powRaises a number to the power of another numberpow(<expr>, <expr>)
nrtCalculates the nth root of a numbernrt(<expr>, <expr>)
addAdds 2 numbers togetheradd(<expr>, <expr>)
subSubtracts one number from anothersub(<expr>, <expr>)
mulMultiplies two numbersmul(<expr>, <expr>)
divDivides one number by anotherdiv(<expr>, <expr>)

Examples

e

Returns Euler’s number:

| eval result=e()

pi

Returns the value of pi:

| eval result=pi()

sin

For a field angle containing 0, this example sets result to the sine (approximately 0):

| eval result=sin(angle)

cos

For a field angle containing 0, this example sets result to the cosine (1.0):

| eval result=cos(angle)

tan

For a field angle containing 0, this example sets result to the tangent (0.0):

| eval result=tan(angle)

sinh

For a field value containing 0, this example sets result to the hyperbolic sine (0.0):

| eval result=sinh(value)

cosh

For a field value containing 0, this example sets result to the hyperbolic cosine (1.0):

| eval result=cosh(value)

tanh

For a field value containing 0, this example sets result to the hyperbolic tangent (0.0):

| eval result=tanh(value)

asin

For a field value containing 0.5, this example sets result to the arcsine in radians:

| eval result=asin(value)

acos

For a field value containing 0.5, this example sets result to the arccosine in radians:

| eval result=acos(value)

atan

For a field value containing 1.0, this example sets result to the arctangent in radians:

| eval result=atan(value)

asinh

For a field value containing 0, this example sets result to the inverse hyperbolic sine:

| eval result=asinh(value)

acosh

For a field value containing 1.0, this example sets result to the inverse hyperbolic cosine:

| eval result=acosh(value)

atanh

For a field value containing 0.5, this example sets result to the inverse hyperbolic tangent:

| eval result=atanh(value)

exp

For a field x containing 2, this example sets result to e^x (approximately 7.389):

| eval result=exp(x)

ln

For a field value containing 2.718, this example sets result to the natural logarithm (approximately 1.0):

| eval result=ln(value)

sqrt

For a field value containing 16, this example sets result to the square root (4.0):

| eval result=sqrt(value)

abs

For a field value containing -5, this example sets result to the absolute value (5):

| eval result=abs(value)

ceil

For a field value containing 3.2, this example sets result to the ceiling (4):

| eval result=ceil(value)

floor

For a field value containing 3.7, this example sets result to the floor (3):

| eval result=floor(value)

log

For fields value containing 100 and base containing 10, this example sets result to the logarithm base 10 of 100 (2.0):

| eval result=log(value, base)

pow

For fields base containing 2 and exponent containing 8, this example sets result to 2 raised to the power of 8 (256):

| eval result=pow(base, exponent)

nrt

For fields value containing 27 and degree containing 3, this example sets result to the cube root of 27 (3.0):

| eval result=nrt(value, degree)

add

For fields a containing 5 and b containing 3, this example sets result to their sum (8):

| eval result=add(a, b)

sub

For fields a containing 10 and b containing 3, this example sets result to the difference (7):

| eval result=sub(a, b)

mul

For fields a containing 4 and b containing 3, this example sets result to their product (12):

| eval result=mul(a, b)

div

For fields numerator containing 10 and denominator containing 2, this example sets result to the quotient (5.0):

| eval result=div(numerator, denominator)