Times

From APL Wiki
Revision as of 10:29, 11 September 2022 by Adám Brudzewsky (talk | contribs) (Text replacement - "</source>" to "</syntaxhighlight>")
Jump to navigation Jump to search
This page describes the dyadic arithmetic function. For sign of a single argument, see Signum.
×

Times (×), Multiply, or Product is a dyadic scalar function which gives the arithmetic product of its arguments. Times shares the glyph <source lang=apl inline>×</syntaxhighlight> with the monadic arithmetic function Signum.

Examples

A long, slow way to write <source lang=apl inline>!10</syntaxhighlight>, assuming <source lang=apl inline>⎕IO←1</syntaxhighlight>: <source lang=apl> ×/⍳10 </syntaxhighlight>

Properties

Multiplication is commutative and associative, but, due to floating point error, may result in small differences between mathematically equivalent expressions.

The identity element for Times is <source lang=apl inline>1</syntaxhighlight>.

Reduction

Reduction with Multiply gives the product of the whole list.

See also

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