Times: Difference between revisions

Jump to navigation Jump to search
398 bytes added ,  05:09, 25 May 2021
(Created page with ":''This page describes the dyadic arithmetic function. For sign of a single argument, see Signum.'' {{Built-in|Product|×}}, '''Times''', or '''Multiplication''' is a d...")
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
:''This page describes the dyadic arithmetic function. For sign of a single argument, see [[Signum]].''
:''This page describes the dyadic arithmetic function. For sign of a single argument, see [[Signum]].''


{{Built-in|Product|×}}, '''Times''', or '''Multiplication''' is a [[dyadic]] [[scalar function]] which gives the arithmetic product of its [[argument]]s. Subtract shares the [[glyph]] <source lang=apl inline>×</source> with the monadic arithmetic function [[Signum]], and its result is the left argument times the right argument.
{{Built-in|Times|×}}, '''Multiply''', or '''Product''' is a [[dyadic]] [[scalar function]] which gives the arithmetic product of its [[argument]]s. Times shares the [[glyph]] <source lang=apl inline>×</source> with the monadic arithmetic function [[Signum]].


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


== Properties ==
== Properties ==


Subtraction is commutative: swapping the arguments don't affect the result, e.g. using [[Commute]], <source lang=apl inline>*⍨</source>.
Multiplication is [[wikipedia:Commutative property|commutative]] and [[wikipedia:Associative property|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</source>.
 
=== Reduction ===


=== Reduction and scan ===
[[Reduction]] with Multiply gives the product of the whole list.


[[Reduction]] with Product gives
== See also ==
* [[Divide]]
* [[Add]]
* [[Power]]


== External links ==
== External links ==
Line 21: Line 28:
=== Documentation ===
=== Documentation ===


* [http://help.dyalog.com/latest/index.htm#Language/Primitive%20Functions/Subtract.htm Dyalog]
* [https://help.dyalog.com/latest/index.htm#Language/Primitive%20Functions/Multiply.htm Dyalog]
* [http://microapl.com/apl_help/ch_020_020_040.htm APLX]
* [http://microapl.com/apl_help/ch_020_020_060.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/d110.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/star#dyadic NuVoc] (as <source lang=j inline>*</source>)
{{APL built-ins}}
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar dyadic functions]]

Navigation menu