Subtract: Difference between revisions
Jump to navigation
Jump to search
m
→Reduction and scan
Miraheze>Marshall m (→Properties) |
Miraheze>Marshall |
||
Line 41: | Line 41: | ||
[[Scan]] with subtraction produces a prefix of an [[wikipedia:Alternating series|alternating series]]. This property is one of the reasons why scan was designed to reduce [[prefix]]es rather than [[suffix]]es of the argument array. As an example, we can see that an alternating series using the [[power]]s of two begins to converge to a third: | [[Scan]] with subtraction produces a prefix of an [[wikipedia:Alternating series|alternating series]]. This property is one of the reasons why scan was designed to reduce [[prefix]]es rather than [[suffix]]es of the argument array. As an example, we can see that an alternating series using the [[power]]s of two begins to converge to a third: | ||
<source lang=apl | <source lang=apl> | ||
-\ ÷2*⍳6 | -\ ÷2*⍳6 | ||
0.5 0.25 0.375 0.3125 0.34375 0.328125 | 0.5 0.25 0.375 0.3125 0.34375 0.328125 |