Divide: Difference between revisions

Jump to navigation Jump to search
19 bytes added ,  15:15, 26 April 2020
no edit summary
(Divide built-in)
 
No edit summary
Line 1: Line 1:
:''This page describes the dyadic arithmetic function. For reciprocal of a single argument, see [[Reciprocal]].''
:''This page describes the dyadic arithmetic function. For reciprocal of a single argument, see [[Reciprocal]].''


{{Built-in|Divide|÷}}, or '''Over''' is a [[dyadic]] [[scalar function]] which gives the arithmetic product of its [[argument]]s. Divide shares the [[glyph]] <source lang=apl inline>÷</source> with the monadic arithmetic function [[Reciprocal]], and its result is the left argument over the right argument.
{{Built-in|Divide|÷}} is a [[dyadic]] [[scalar function]] which gives the arithmetic ratio of its [[argument]]s. Divide shares the [[glyph]] <source lang=apl inline>÷</source> with the monadic arithmetic function [[Reciprocal]], and its result is the left argument divided by the right argument.


== Examples ==
== Examples ==
Line 11: Line 11:
1.5J0.5 1.25J¯1.25 20J25
1.5J0.5 1.25J¯1.25 20J25
   
   
       ⎕DIV←1
       ⎕DIV←1 ⍝ this sets division by 0 to always return 0
       2 0 5÷4 0 0
       2 0 5÷4 0 0
0.5 0 0
0.5 0 0
Line 22: Line 22:
=== Reduction and scan ===
=== Reduction and scan ===


[[Reduction]] with Division gives the alternating product of the whole list.
[[Reduction]] with Division gives the alternating product.


== External links ==
== External links ==

Navigation menu