Exponential: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
(Created page with ":''This page describes the monadic arithmetic function. For the dyadic function, see Power (function).'' {{Built-in|Exponential|*}} is a monadic scalar function w...")
 
Line 24: Line 24:


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

Revision as of 06:10, 2 June 2020

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 * with the dyadic arithmetic function Power.

Examples

Euler's constant itself can be obtained by supplying 1 as the argument.

      *1
2.718281828

On APL implementations that support complex numbers, one can demonstrate Euler's identity (with the help of Pi Times ):

      1+*○0J1
0
Works in: Dyalog APL

Properties

Exponential is a special case of Power with the default left argument of e (*1).

      ((*1)∘* ≡ *) 0 1 ¯1 0J1
1
Works in: Dyalog APL

Exponential and natural log are inverses of each other, except where the natural log is undefined.

      (⊢ ≡ ⍟∘*) 0 1 ¯1 0J1
1
      (⊢ ≡ *∘⍟) 1 ¯1 0J1 ⍝ natural log of zero is undefined
1
Works in: Dyalog APL

External links

Documentation

APL built-ins [edit]
Primitives (Timeline) Functions
Scalar
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare RootRound
Dyadic AddSubtractTimesDivideResiduePowerLogarithmMinimumMaximumBinomialComparison functionsBoolean functions (And, Or, Nand, Nor) ∙ GCDLCMCircularComplexRoot
Non-Scalar
Structural ShapeReshapeTallyDepthRavelEnlistTableCatenateReverseRotateTransposeRazeMixSplitEncloseNestCut (K)PairLinkPartitioned EnclosePartition
Selection FirstPickTakeDropUniqueIdentityStopSelectReplicateExpandSet functions (IntersectionUnionWithout) ∙ Bracket indexingIndexCartesian ProductSort
Selector Index generatorGradeIndex OfInterval IndexIndicesDealPrefix and suffix vectors
Computational MatchNot MatchMembershipFindNub SieveEncodeDecodeMatrix InverseMatrix DivideFormatExecuteMaterialiseRange
Operators Monadic EachCommuteConstantReplicateExpandReduceWindowed ReduceScanOuter ProductKeyI-BeamSpawnFunction axisIdentity (Null, Ident)
Dyadic BindCompositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner ProductDeterminantPowerAtUnderRankDepthVariantStencilCutDirect definition (operator)Identity (Lev, Dex)
Quad names Index originComparison toleranceMigration levelAtomic vector