> For the complete documentation index, see [llms.txt](https://docs.valq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valq.com/model/formula-functions/math-functions/log.md).

# LOG

The LOG function returns the logarithm of a number to the base you specify.

### Syntax

LOG(value, base) - > number

### Arguments

<table><thead><tr><th width="178.33333333333331">Arguments</th><th width="213">Datatype</th><th>Description</th></tr></thead><tbody><tr><td>value</td><td>Number, Node reference</td><td>The positive real number for which you want to derive the logarithm.</td></tr><tr><td>base</td><td>Number, Node reference</td><td>The base of the logarithm.</td></tr></tbody></table>

### Example

Consider the below scenario where we have values and base for four periods. The objective is to derive the LOG of those values.

<table><thead><tr><th width="136">Period</th><th width="118" align="center">1</th><th width="117" align="center">2</th><th width="125" align="center">3</th><th align="center">4</th></tr></thead><tbody><tr><td><mark style="color:purple;">value</mark></td><td align="center">30</td><td align="center">40</td><td align="center">35</td><td align="center">50</td></tr><tr><td><mark style="color:orange;">base</mark></td><td align="center">5</td><td align="center">4</td><td align="center">3</td><td align="center">6</td></tr></tbody></table>

&#x20;To achieve this, the following formula should be written in the \[LOG] node:

<mark style="color:blue;">**`LOG`**</mark>**`(`**<mark style="color:purple;">**`[value]`**</mark>**` ``,`` `**<mark style="color:orange;">**`[base]`**</mark>**`)`**

### Result

| LOG | 2.113282753 | 2.660964 | 3.2362173 | 2.1833416 |
| --- | ----------- | -------- | --------- | --------- |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.valq.com/model/formula-functions/math-functions/log.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
