Imaginary: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 18: Line 18:


* J [https://www.jsoftware.com/help/dictionary/djdot.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/jdot NuVoc]
* J [https://www.jsoftware.com/help/dictionary/djdot.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/jdot NuVoc]
== References ==
<references/>
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar monadic functions]]
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar monadic functions]]

Revision as of 01:21, 4 June 2020

Imaginary () is a monadic scalar function which multiplies the argument by the imaginary unit 0J1. This can be seen as a mapping from a real number to a pure imaginary number (a complex number with the real part of 0). It was added to J as j. together with initial support for complex numbers, and was adopted in Extended Dyalog APL using the glyph as a monadic counterpart of Complex. In other APL implementations that support complex numbers, Circular with the left argument of ¯11 has the same functionality as Imaginary.

Examples

Try it online!

      ⌾ 3 ¯4 6
0J3 0J¯4 0J6

Imaginary is equivalent to Complex with the default left argument of 0.

Try it online!

      0 ⌾ 3 ¯4 6
0J3 0J¯4 0J6

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