---
name: "log"
type: command
status: ok
groups: ["Math"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/log
revid: 379450
updated: 2026-10-31T00:08:08Z
---

# log

*Command · Math · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

## Description

Base-10 logarithm of x.

## Syntax

```sqf
log x
```

**Parameters:**

- `x`: [Number](../topics/Number.md) - a positive number

**Returns:** [Number](../topics/Number.md)

## Examples

### Example 1

```sqf
_log = log 10;
```

### Example 2

```sqf
_log = log abs -10;
```

### Example 3

```sqf
finite log -10; // Returns false
```

## See also

Math Commands

## Community notes

**ffur2007slx2_5** — 2014-06-16

To clarify:

```sqf
y = 10 ^ x // x = log y
```

People use logarithm at the purpose of simplifying multiplication via exponents plus years before.

```sqf
23456*45634 = 1.07039e9
log 23456 = 4.37025; log 45634 = 4.65929; (log 23456) + (log 45634) = 9.02954
10^((log 23456) + (log 45634)) = 10 ^ 9.02954  // same as 23456*45634
```

As modern usage, for instance, to evaluate another exponent when multiple is known (Which magnitude is 4 times stronger than 8.3 earthquake?):

```sqf
//_Unknown = log x; 8.3 = log y
// x = 10 ^_Unknown; y = 10 ^8.3
//x/y = (10 ^_Unknown)/(10 ^8.3) = log 4
// x/y = _Unknown – 8.3 = 0.6
//_result = 8.9 magnitude
_result = (log 4) + 8.3
```

<sub>Source: [BI Community Wiki — log](https://community.bistudio.com/wiki/log) (revision 379450).</sub>
