Power and logarithm

sqr function

Returns the square of the argument.

Syntax

sqr(z)

Description

The sqr function calculates the square of z, i.e. z raised to the power of 2. z may be any numeric expression that evaluates to a real number or a complex number.

exp function

Returns e raised to the power of the argument.

Syntax

exp(z)

Description

The exp function is used to raise e, Euler's constant, to the power of z. This is the same as e^z. z may be any numeric expression that evaluates to a real number or a complex number.

sqrt function

Returns the square root of the argument.

Syntax

sqrt(z)

Description

The sqrt function calculates the square root of z, i.e. z raised to the power of ˝. z may be any numeric expression that evaluates to a real number or a complex number. If the calculation is done with real numbers, the argument is only defined for z 0.

root function

Returns the nth root of the argument.

Syntax

root(n, z)

Description

The root function calculates the nth root of z. n and z may be any numeric expression that evaluates to a real number or a complex number. If the calculation is done with real numbers, the argument is only defined for z 0.

Remarks

When the calculation is done with real numbers, the function is only defined for z<0 if n is an odd integer. For calculations with complex numbers, root is defined for the whole complex plane except at the pole n=0. Notice that for calculations with complex numbers the result will always have an imaginary part when z<0 even though the result is real when calculations are done with real numbers and n is an odd integer.

Example

Instead of x^(1/3), you can use root(3, x).

ln function

Returns the natural logarithm of the argument.

Syntax

ln(z)

Description

The ln function calculates the logarithm of z with base e, which is Euler's constant. ln(z) is commonly known as the natural logarithm. z may be any numeric expression that evaluates to a real number or a complex number. If the calculation is done with real numbers, the argument is only defined for z>0. When calculating with complex numbers, z is defined for all numbers except z=0.

log function

Returns the base 10 logarithm of the argument.

Syntax

log(z)

Description

The log function calculates the logarithm of z with base 10. z may be any numeric expression that evaluates to a real number or a complex number. If the calculation is done with real numbers, the argument is only defined for z>0. When calculating with complex numbers, z is defined for all numbers except z=0.

logb function

Returns the base n logarithm of the argument.

Syntax

logb(z, n)

Description

The logb function calculates the logarithm of z with base n. z may be any numeric expression that evaluates to a real number or a complex number. If the calculation is done with real numbers, the argument is only defined for z>0. When calculating with complex numbers, z is defined for all numbers except z=0. n must evaluate to a positive real number.