Pi Times: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
m (Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com")
m (Text replacement - "<source" to "<syntaxhighlight")
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Built-in|Pi Times|○}} is a [[monadic]] [[scalar function]] which gives the [[argument]] [[times]] the mathematical constant [[wikipedia:pi|pi]] <math>\pi</math>. Its [[glyph]] <source lang=apl inline>○</source>, which is shared with the dyadic arithmetic function [[Circular]], alludes to pi being the ratio of a circle's circumference to its diameter. The phrase "some value times <math>\pi</math>" appears frequently in mathematical formulas related to a [[wikipedia:circle|circle]] or [[wikipedia:trigonometric functions|trigonometric functions]] while <math>\pi</math> raised to some [[power]] is rare, which explains the design decision behind this function.
{{Built-in|Pi Times|○}} is a [[monadic]] [[scalar function]] which gives the [[argument]] [[times]] the mathematical constant [[wikipedia:pi|pi]] <math>\pi</math>. Its [[glyph]] <syntaxhighlight lang=apl inline>○</syntaxhighlight>, which is shared with the dyadic arithmetic function [[Circular]], alludes to pi being the ratio of a circle's circumference to its diameter. The phrase "some value times <math>\pi</math>" appears frequently in mathematical formulas related to a [[wikipedia:circle|circle]] or [[wikipedia:trigonometric functions|trigonometric functions]] while <math>\pi</math> raised to some [[power]] is rare, which explains the design decision behind this function.


[[File:Applepie.jpg|thumb|right|A circular apple pie]]
[[File:Applepie.jpg|thumb|right|A circular apple pie]]
Line 6: Line 6:
The value of <math>\pi</math> can be obtained by giving the argument of 1.
The value of <math>\pi</math> can be obtained by giving the argument of 1.


<source lang=apl>
<syntaxhighlight lang=apl>
       ○1
       ○1
3.141592654
3.141592654
</source>
</syntaxhighlight>


As a pun, <source lang=apl inline>○1</source> is often called ''apple pie'', jokingly using an unconventional pronunciation of [[the name APL]] in conjunction with the [[wikipedia:homophone|homophone]]s ''pi''/''pie''.
As a pun, <syntaxhighlight lang=apl inline>○1</syntaxhighlight> is often called ''apple pie'', jokingly using an unconventional pronunciation of [[the name APL]] in conjunction with the [[wikipedia:homophone|homophone]]s ''pi''/''pie''.
== External links ==
== External links ==



Revision as of 22:20, 10 September 2022

Pi Times () is a monadic scalar function which gives the argument times the mathematical constant pi . Its glyph , which is shared with the dyadic arithmetic function Circular, alludes to pi being the ratio of a circle's circumference to its diameter. The phrase "some value times " appears frequently in mathematical formulas related to a circle or trigonometric functions while raised to some power is rare, which explains the design decision behind this function.

A circular apple pie

Examples

The value of can be obtained by giving the argument of 1.

      ○1
3.141592654

As a pun, ○1 is often called apple pie, jokingly using an unconventional pronunciation of the name APL in conjunction with the homophones pi/pie.

External links

Documentation

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