## Power and logarithm

### sqr function

Returns the square of the argument.

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.

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.

 Wikipedia MathWorld

### sqrt function

Returns the square root of the argument.

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.

 Wikipedia MathWorld

### root function

Returns the `n`th root of the argument.

root(n, z)

#### Description

The `root` function calculates the `n`th 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).

 Wikipedia MathWorld

### ln function

Returns the natural logarithm of the argument.

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.

 Wikipedia MathWorld

### log function

Returns the base 10 logarithm of the argument.

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.

 Wikipedia MathWorld

### logb function

Returns the base `n` logarithm of the argument.

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.