⊛ — Natural log / Logarithm
Function. Keys: Alt-o 8. Hanzi: 对 (對). Ranks: 0 monadic, 0 0 dyadic
⊛Y: ln Y. Pervasive.
⊛1 ⍝ 0X⊛Y: logX Y. Pervasive.
2⊛8 ⍝ 3
10⊛100 ⍝ 2
1⊛1 ⍝ 0Uses complex logarithms where needed. ⊛0 is ¯∞. 1⊛1 is 0 for Mathish types with Mathish mode on. Other base-1 cases give an infinity or NaN.
Inverse
⊛⁻ is *. (⊛↢X)⁻Y is X*÷Y.
2⊛⁻3 ⍝ 8
⊛↢8 ⁻ 3 ⍝ 2Fast combinations
BPL computes this combination with a dedicated algorithm. 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 ⊛ of 1+Y. Softplus, ⊛1+*Y, stays accurate for a very negative Y:
f←⊛1+ ◇ f 1E¯17 ⍝ 1ₑ¯17
softplus←⊛1+* ◇ softplus ¯40 ⍝ 4.248354255ₑ¯18