# (log number)
[GstarCAD 2011](../../../Index.md) → [Developer Reference](../../%28Developer%20Reference%29.md) → [AutoLISP Reference](../%28AutoLISP%20Reference%29.md) → [LISP Functions](%28LISP%20Functions%29.md)
<!-- help-structure:notice -->
> **Source status:** This source topic has 1 recorded inherited issue(s). [Source issue details](../../../Source%20Issues.md).
<!-- /help-structure:notice -->
<a id="215"></a>
## (log number)
---
Calculate the natural logarithm.
---
This function returns the natural logarithm, even though "ln" is usually considered the natural log in mathematics. This function cannot take a negative number. The result is a [real number](../../../Source%20Issues.md#issue-e69b84bd13b9f6ed).
### Examples
| Code | Returns |
| --- | --- |
| (**log** 0\) | 1.000000 |
| (**log** 9\) | 2.19722 |
| (**log** 10\) | 2.30239 |
| (**log** 2.30239) | 0.834035 |
**NOTE** The [exp](%28exp%20number%29.md) function is the opposite of the **log** function.
**Tell me about...**
[(expt base power)](%28expt%20base%20power%29.md)
[(log10 number)](%28log10%20number%29.md)
[LISP Compatibility](../LISP%20Compatibility.md)
[Programming Overview of LISP (LISt Processing) Language](../Programming%20Overview%20of%20LISP%20%28LISt%20Processing%29%20Language.md)
<a id="holding"></a>
## Other versions with matching text
[GstarCAD 2012](../../../../2012/Developer%20Reference/AutoLISP%20Reference/LISP%20Functions/%28log%20number%29.md)