# ln() function

The ln() function returns the natural
logarithm (base e, which is 2.718281828 rounded to precision) of a
given numeric expression.

## Syntax

```
ln(num.exp)
```

## Parameter(s)

| num.exp | Number to be converted to its natural logarithm form. |
| --- | --- |

## Description

If the expression is less than
or equal to 0, ln returns a 0 and prints a run-time
error message.

This function is the inverse of the exp() function.

## See also

- [cos() function](https://d3codex.com/pickbasic-flashbasic/cos-function/)
- [exp() function](https://d3codex.com/pickbasic-flashbasic/exp-function/)
- [BASIC functions](https://d3codex.com/pickbasic-flashbasic/basic-functions/)
- [Numeric expressions](https://d3codex.com/pickbasic-flashbasic/numeric-expressions/)
- [precision statement](https://d3codex.com/pickbasic-flashbasic/precision-statement/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [tan() function](https://d3codex.com/pickbasic-flashbasic/tan-function/)

---
Source: https://d3codex.com/pickbasic-flashbasic/ln-function/ - part of the D3Codex reference.
