Exponential
- This page describes the monadic arithmetic function. For the dyadic function, see Power (function).
Exponential (*
) is a monadic scalar function which computes the exponential function (i.e. the power of Euler's constant e) of the argument. Exponential shares the glyph <source lang=apl inline>*</syntaxhighlight> with the dyadic arithmetic function Power.
Examples
Euler's constant itself can be obtained by supplying 1 as the argument.
<source lang=apl>
*1
2.718281828 </syntaxhighlight>
On APL implementations that support complex numbers, one can demonstrate Euler's identity (with the help of Pi Times <source lang=apl inline>○</syntaxhighlight>):
<source lang=apl>
1+*○0J1
0
</syntaxhighlight>
Properties
Exponential is a special case of Power with the default left argument of e (<source lang=apl inline>*1</syntaxhighlight>).
<source lang=apl>
((*1)∘* ≡ *) 0 1 ¯1 0J1
1
</syntaxhighlight>
Exponential and natural log <source lang=apl inline>⍟</syntaxhighlight> are inverses of each other, except where the natural log is undefined.
<source lang=apl>
(⊢ ≡ ⍟∘*) 0 1 ¯1 0J1
1
(⊢ ≡ *∘⍟) 1 ¯1 0J1 ⍝ natural log of zero is undefined
1
</syntaxhighlight>
See also
External links
Documentation
- Dyalog
- APLX
- J Dictionary, NuVoc
- BQN