Changes

Jump to navigation Jump to search

Scalar function

72 bytes added, 09:07, 29 October 2019
m
Text replacement - "</code>" to "</source>"
A scalar function is one of a class of primitive functions that apply to arguments one [[element]] at a time. Dyadic scalar functions pair elements of their arguments based on [[conformability]] rules, and thus are subject to [[scalar extension]]. In [[Nested array model|nested]] array languages scalar functions recursively descend into nested arrays until they can be applied to [[simple scalars]]; in [[Flat array model|flat]] array languages they usually do not apply inside [[boxes]].
Only a particular [[valence]] of a function is labelled "scalar". The scalar monad [[Not]] usually shares the glyph <source lang=apl inline>~</codesource> with non-scalar dyad [[Without]], and similarly scalar [[Roll]] and non-scalar [[Deal]] are both written <source lang=apl inline>?</codesource>.
== Standard scalar functions ==
{|
| <source lang=apl inline>+</codesource> || [[Conjugate]]
|-
| <source lang=apl inline>-</codesource> || [[Negate]]
|-
| <source lang=apl inline>×</codesource> || [[Signum]] or Direction
|-
| <source lang=apl inline>÷</codesource> || [[Reciprocal]]
|-
| <source lang=apl inline>⌊</codesource> || [[Floor]]
|-
| <source lang=apl inline>⌈</codesource> || [[Ceiling]]
|-
| <source lang=apl inline>*</codesource> || [[Exponential]]
|-
| <source lang=apl inline>⍟</codesource> || [[Natural Logarithm]]
|-
| <source lang=apl inline><nowiki>|</nowiki></codesource> || [[Magnitude]]
|-
| <source lang=apl inline>!</codesource> || [[Factorial]]
|-
| <source lang=apl inline>○</codesource> || [[Pi Times]]
|-
| <source lang=apl inline>~</codesource> || [[Not]]
|-
| <source lang=apl inline>∊</codesource> || [[Type]]
|}
{|
| <source lang=apl inline>+</codesource> || [[Plus]]
|-
| <source lang=apl inline>-</codesource> || [[Minus]]
|-
| <source lang=apl inline>×</codesource> || [[Times]]
|-
| <source lang=apl inline>÷</codesource> || [[Divide]]
|-
| <source lang=apl inline>⌊</codesource> || [[Minimum]]
|-
| <source lang=apl inline>⌈</codesource> || [[Maximum]]
|-
| <source lang=apl inline>*</codesource> || [[Power function]]
|-
| <source lang=apl inline>⍟</codesource> || [[Logarithm]]
|-
| <source lang=apl inline><nowiki>|</nowiki></codesource> || [[Residue]]
|-
| <source lang=apl inline>!</codesource> || [[Binomial]] coefficient or combination function
|-
| <source lang=apl inline>○</codesource> || [[Circle function]]
|-
| <source lang=apl inline>∧</codesource> || [[Logical And]]
|-
| <source lang=apl inline>∨</codesource> || [[Logical Or]]
|-
| <source lang=apl inline>⍲</codesource> || [[Nand]]
|-
| <source lang=apl inline>⍱</codesource> || [[Nor]]
|-
| <source lang=apl inline><</codesource> || [[Less than]]
|-
| <source lang=apl inline>≤</codesource> || [[Less than or equal to]]
|-
| <source lang=apl inline>=</codesource> || [[Equal to]]
|-
| <source lang=apl inline>≥</codesource> || [[Greater than or equal to]]
|-
| <source lang=apl inline>></codesource> || [[Greather than]]
|-
| <source lang=apl inline>≠</codesource> || [[Not equal to]]
|}

Navigation menu