# Logarithm

> Get the logarithm of a number with a specified base.

- ID: `logarithm_basic`
- Type: Block
- Category: [Math](https://inventor.bot/docs/reference/blocks/math.md)

- Value block: it can be used directly inside expressions, e.g. `"Result: " + logarithm_basic(Args{...})`.

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `number` | yes | Number to take the logarithm of. | e.g. `"1000"` |
| `base` |  | Base for the logarithm. Defaults to 10 if not provided. | e.g. `"10"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `logarithm` | Logarithm result. | e.g. `"3"` |

**Example**

```go
logarithm := logarithm_basic(Args{number: 1000})
send_text_message(Args{channel_id: trigger.channel_id, message_content: "Logarithm: " + logarithm})
```