4,493
edits
m (Text replacement - "</source>" to "</syntaxhighlight>") |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 1: | Line 1: | ||
:''This page describes the monadic arithmetic function. For the dyadic function, see [[Power (function)]].'' | :''This page describes the monadic arithmetic function. For the dyadic function, see [[Power (function)]].'' | ||
{{Built-in|Exponential|*}} is a [[monadic]] [[scalar function]] which computes the [[wikipedia:exponential function|exponential function]] (i.e. the power of [[wikipedia:e (mathematical constant)|Euler's constant e]]) of the [[argument]]. Exponential shares the [[glyph]] < | {{Built-in|Exponential|*}} is a [[monadic]] [[scalar function]] which computes the [[wikipedia:exponential function|exponential function]] (i.e. the power of [[wikipedia:e (mathematical constant)|Euler's constant e]]) of the [[argument]]. Exponential shares the [[glyph]] <syntaxhighlight lang=apl inline>*</syntaxhighlight> with the dyadic arithmetic function [[Power]]. | ||
== Examples == | == Examples == | ||
Line 7: | Line 7: | ||
Euler's constant itself can be obtained by supplying 1 as the argument. | Euler's constant itself can be obtained by supplying 1 as the argument. | ||
< | <syntaxhighlight lang=apl> | ||
*1 | *1 | ||
2.718281828 | 2.718281828 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
On APL implementations that support [[complex]] numbers, one can demonstrate [[wikipedia:Euler's identity|Euler's identity]] (with the help of [[Pi Times]] < | On APL implementations that support [[complex]] numbers, one can demonstrate [[wikipedia:Euler's identity|Euler's identity]] (with the help of [[Pi Times]] <syntaxhighlight lang=apl inline>○</syntaxhighlight>): | ||
< | <syntaxhighlight lang=apl> | ||
1+*○0J1 | 1+*○0J1 | ||
0 | 0 | ||
Line 21: | Line 21: | ||
== Properties == | == Properties == | ||
Exponential is a special case of [[Power]] with the default left argument of e (< | Exponential is a special case of [[Power]] with the default left argument of e (<syntaxhighlight lang=apl inline>*1</syntaxhighlight>). | ||
< | <syntaxhighlight lang=apl> | ||
((*1)∘* ≡ *) 0 1 ¯1 0J1 | ((*1)∘* ≡ *) 0 1 ¯1 0J1 | ||
1 | 1 | ||
</syntaxhighlight>{{Works in|[[Dyalog APL]]}} | </syntaxhighlight>{{Works in|[[Dyalog APL]]}} | ||
Exponential and [[Natural Logarithm|natural log]] < | Exponential and [[Natural Logarithm|natural log]] <syntaxhighlight lang=apl inline>⍟</syntaxhighlight> are inverses of each other, except where the natural log is undefined. | ||
< | <syntaxhighlight lang=apl> | ||
(⊢ ≡ ⍟∘*) 0 1 ¯1 0J1 | (⊢ ≡ ⍟∘*) 0 1 ¯1 0J1 | ||
1 | 1 |