APL Wiki logo: Difference between revisions

Jump to navigation Jump to search
463 bytes added ,  01:41, 3 November 2019
Miraheze>Adám Brudzewsky
Miraheze>Adám Brudzewsky
Line 126: Line 126:
1  2.5 3.5 2.5 1   
1  2.5 3.5 2.5 1   
</source>
</source>
== Rounding ==
The last step is to round these numbers down. Traditional mathematics writes ''floor'' as <math>⌊x⌋</math> but APL is regular, and no function is denoted by two separated symbols. If the function takes a single argument, then the symbol will be on the left, so we write floor as <source lang=apl inline>⌊x</source>:
<source lang=apl>
      ⌊∘.+⍨.5×4!⍨⍳5
1 2 3 2 1
2 4 5 4 2
3 5 6 5 3
2 4 5 4 2
1 2 3 2 1
</source>
And there it is!
== References ==
== References ==
<references />
<references />

Navigation menu