From APL Wiki
Jump to navigation Jump to search

The inverse of a function is a function that undoes its effect, computing an argument that corresponds to the given result for that function. In APL it's usually written with the Power operator as (f⍣¯1) x. While some functions such as Reverse have an obvious exact inverse, others might have no valid inverse or many possible choices for a given result. Treatment of these cases varies among dialects, but a common rule is that the inverse should satisfy x ≡ f (f⍣¯1) x, making it a right inverse in mathematical terminology. A stand-alone inverse operator is defined in Kap (˝), BQN ("Undo", ), and Uiua ("Un", °).

As with Power in general, the dyadic inverse ⍺(f⍣¯1)⍵ is defined to be the inverse of ⍺∘f, that is, (⍺∘f⍣¯1)⍵.

External links


  • APL Cultivation 34


APL built-ins [edit]
Primitives (Timeline) Functions
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare Root
Dyadic AddSubtractTimesDivideResiduePowerLogarithmMinimumMaximumBinomialComparison functionsBoolean functions (And, Or, Nand, Nor) ∙ GCDLCMCircularComplexRoot
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 axis
Dyadic BindCompositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner ProductDeterminantPowerAtUnderRankDepthVariantStencilCutDirect definition (operator)
Quad names Index originComparison toleranceMigration levelAtomic vector