2,951
edits
Miraheze>Marshall No edit summary |
(→Documentation: BQN) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
:''This page describes the dyadic arithmetic function. For negation of a single argument, see [[Negate]]. For subtraction of sets, see [[Without]].'' | :''This page describes the dyadic arithmetic function. For negation of a single argument, see [[Negate]]. For subtraction of sets, see [[Without]].'' | ||
{{Built-in|Subtract|-}}, '''Minus''', '''Subtraction''', or '''Difference''' is a [[dyadic]] [[scalar function]] which gives the arithmetic [[wikipedia:Subtraction|difference]] of its [[argument]]s. Subtract shares the [[glyph]] <source lang=apl inline>-</source> with the arithmetic | {{Built-in|Subtract|-}}, '''Minus''', '''Subtraction''', or '''Difference''' is a [[dyadic]] [[scalar function]] which gives the arithmetic [[wikipedia:Subtraction|difference]] of its [[argument]]s. Subtract shares the [[glyph]] <source lang=apl inline>-</source> with the arithmetic function [[Negate]], and its result is the left argument [[plus]] the negation of the right. | ||
== Examples == | == Examples == | ||
Line 15: | Line 15: | ||
== Properties == | == Properties == | ||
See also [[ | See also [[Add#Properties]]. | ||
Subtraction is anti-commutative: swapping the arguments negates the result, or using [[Commute]], <source lang=apl inline>-⍨</source> {{←→}} <source lang=apl inline>--</source>. | Subtraction is anti-commutative: swapping the arguments negates the result, or using [[Commute]], <source lang=apl inline>-⍨</source> {{←→}} <source lang=apl inline>--</source>. | ||
Line 45: | Line 45: | ||
0.5 0.25 0.375 0.3125 0.34375 0.328125 | 0.5 0.25 0.375 0.3125 0.34375 0.328125 | ||
</source> | </source> | ||
== See also == | |||
* [[Divide]] | |||
* [[Without]] | |||
== External links == | == External links == | ||
Line 50: | Line 53: | ||
=== Documentation === | === Documentation === | ||
* [ | * [https://help.dyalog.com/latest/index.htm#Language/Primitive%20Functions/Subtract.htm Dyalog] | ||
* [http://microapl.com/apl_help/ch_020_020_040.htm APLX] | * [http://microapl.com/apl_help/ch_020_020_040.htm APLX] | ||
* J [https://www.jsoftware.com/help/dictionary/d120.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/minus#dyadic NuVoc] | * J [https://www.jsoftware.com/help/dictionary/d120.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/minus#dyadic NuVoc] | ||
* [https://mlochbaum.github.io/BQN/doc/arithmetic.html#basic-arithmetic BQN] | |||
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar dyadic functions]] |