# [`⊛`](https://bpl.fast.ai//glyphs/circle-star.html) — Natural log / Logarithm

Function. Keys: `Alt-o 8`. Hanzi: `对` (`對`). Ranks: `0` monadic, `0 0` dyadic

`⊛Y`: ln Y. Pervasive.

```bpl
⊛1                ⍝ 0
```

`X⊛Y`: log<sub>X</sub> Y. Pervasive.

```bpl
2⊛8               ⍝ 3
10⊛100            ⍝ 2
1⊛1               ⍝ 0
```

Uses complex logarithms where needed. `⊛0` is `¯∞`. `1⊛1` is `0` for [Mathish types](../terms.md#term-mathish-types) with [Mathish mode](../numbers.md#mathish-mode) on. Other base-1 cases give an infinity or NaN.

## Inverse

`⊛⁻` is [`*`](https://bpl.fast.ai//glyphs/star.html). `(⊛↢X)⁻Y` is `X*÷Y`.

```bpl
2⊛⁻3      ⍝ 8
⊛↢8 ⁻ 3   ⍝ 2
```

## Fast combinations

BPL computes this combination with a dedicated algorithm. [Trains](../evaluation.md#trains) says which spellings BPL recognises.

| Combination | Applies to | Benefit |
|--- |--- |--- |
| `⊛1+Y`, `⊛Y+1`, `⊛1+` or `⊛∘(1+)` | real `Y` | log1p keeps the digits of a small `Y` that `1+Y` rounds away |

At an item below ¯1 under dynamic kinds, and on complex numbers, `⊛1+Y` computes [`⊛`](https://bpl.fast.ai//glyphs/circle-star.html) of `1+Y`. Softplus, `⊛1+*Y`, stays accurate for a very negative `Y`:

```bpl
f←⊛1+ ◇ f 1E¯17          ⍝ 1ₑ¯17
softplus←⊛1+* ◇ softplus ¯40   ⍝ 4.248354255ₑ¯18
```
