Mod: Difference between revisions

109 bytes added ,  1 year ago
add mod differences from K3
("Paragraph cleanup")
(add mod differences from K3)
 
Line 3:
The '''mod''', '''modulo''', '''remainder''' or '''residue'''<ref>https://aplwiki.com/wiki/Residue</ref> function, denoted by <code>!</code>, is used for modulo in K.
 
Up until the K4 dialect, the modulo operatorverb was [[Atomicity|left atomic]] on account ofhad the [[rotate]] overload.following characteristics:
* <code>x</code> is the dividend and <code>y</code> is the divisor.
* [[Atomicity|left atomic]] on account of the [[rotate]] overload.
 
From K5 onward, the modulo primitive is flipped and [[Atomicity|right atomic.]]<ref>[https://chat.stackexchange.com/transcript/message/58587397#58587397 JohnEarnest on the order of arguments for mod in K]</ref>
 
<pre>