Floor: Difference between revisions

Jump to navigation Jump to search
1 byte removed ,  16:27, 24 December 2023
m
(Add models for floor)
 
Line 43: Line 43:


<syntaxhighlight lang=apl>
<syntaxhighlight lang=apl>
       model←{⍵-(1|⍵)}
       model←{⍵-1|⍵}
</syntaxhighlight>
</syntaxhighlight>


To model it without using residue because residue uses floor under the hood. Approaches like converting to strings and then stripping the decimal component or converting to binary and stripping the decimal component can be used.
To model it without using residue, because residue uses floor under the hood, approaches like converting to strings and then stripping the decimal component or converting to binary and stripping the decimal component can be used.


<syntaxhighlight lang=apl>
<syntaxhighlight lang=apl>

Navigation menu