Natural Logarithm: Difference between revisions

Jump to navigation Jump to search
81 bytes added ,  20:58, 10 September 2022
m
Text replacement - "</source>" to "</syntaxhighlight>"
No edit summary
m (Text replacement - "</source>" to "</syntaxhighlight>")
Line 2: Line 2:
:''This page describes the monadic arithmetic function. For the dyadic logarithm function, see [[Logarithm]].''
:''This page describes the monadic arithmetic function. For the dyadic logarithm function, see [[Logarithm]].''


{{Built-in|Natural Logarithm|⍟}}, or '''Natural Log''', is a [[monadic]] [[scalar function]] which computes the [[wikipedia:natural logarithm|natural logarithm]] of the [[argument]]. Logarithm shares the [[glyph]] <source lang=apl inline>⍟</source> with the dyadic arithmetic function [[Logarithm]]. The [[glyph]], a composition of the glyphs for [[Circular]] (<source lang=apl inline>○</source>) and [[Exponential]] (<source lang=apl inline>*</source>) to indicate its close mathematical ties with these two functions, is a stylised tree log.<ref>[[E. E. McDonnell|McDonnell, E. E.]]. [https://www.jsoftware.com/papers/eem/storyofo.htm Recreational APL: The Story of <source lang=apl inline>○</source>]. [[APL Quote-Quad]], Volume 8, Number 2, 1977-12.</ref>
{{Built-in|Natural Logarithm|⍟}}, or '''Natural Log''', is a [[monadic]] [[scalar function]] which computes the [[wikipedia:natural logarithm|natural logarithm]] of the [[argument]]. Logarithm shares the [[glyph]] <source lang=apl inline>⍟</syntaxhighlight> with the dyadic arithmetic function [[Logarithm]]. The [[glyph]], a composition of the glyphs for [[Circular]] (<source lang=apl inline>○</syntaxhighlight>) and [[Exponential]] (<source lang=apl inline>*</syntaxhighlight>) to indicate its close mathematical ties with these two functions, is a stylised tree log.<ref>[[E. E. McDonnell|McDonnell, E. E.]]. [https://www.jsoftware.com/papers/eem/storyofo.htm Recreational APL: The Story of <source lang=apl inline>○</syntaxhighlight>]. [[APL Quote-Quad]], Volume 8, Number 2, 1977-12.</ref>


== Examples ==
== Examples ==
Line 9: Line 9:
       ⍟1 2 (*1) (*10)
       ⍟1 2 (*1) (*10)
0 0.6931471806 1 10
0 0.6931471806 1 10
</source>
</syntaxhighlight>


== Properties ==
== Properties ==


Natural logarithm is a special case of [[Logarithm]] with the default left argument of e (<source lang=apl inline>*1</source>).
Natural logarithm is a special case of [[Logarithm]] with the default left argument of e (<source lang=apl inline>*1</syntaxhighlight>).


<source lang=apl>
<source lang=apl>
       ((*1)∘⍟ ≡ ⍟) 1 ¯1 0J1
       ((*1)∘⍟ ≡ ⍟) 1 ¯1 0J1
1
1
</source>{{Works in|[[Dyalog APL]]}}
</syntaxhighlight>{{Works in|[[Dyalog APL]]}}


Natural logarithm and [[exponential]] <source lang=apl inline>*</source> are inverses of each other, except where the natural log is undefined.
Natural logarithm and [[exponential]] <source lang=apl inline>*</syntaxhighlight> are inverses of each other, except where the natural log is undefined.


<source lang=apl>
<source lang=apl>
Line 27: Line 27:
       (⊢ ≡ *∘⍟) 1 ¯1 0J1 ⍝ natural log of zero is undefined
       (⊢ ≡ *∘⍟) 1 ¯1 0J1 ⍝ natural log of zero is undefined
1
1
</source>{{Works in|[[Dyalog APL]]}}
</syntaxhighlight>{{Works in|[[Dyalog APL]]}}


== External links ==
== External links ==

Navigation menu