divide

From The K Language Wiki
Revision as of 06:15, 9 July 2022 by Promovicz (talk | contribs) ("Better category ordering, add redirects to categories, fix pseudo-adverb categories")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Divide
x%y

The divide function is generally denoted by %.

Divide always performs float division. For integer division, use floor along with this primitive: (_%)

The divide primitive is fully atomic.

 1%2
0.5

 1 2 3+4 5 6
0.25 0.4 0.5

 ((23;45);(3;4))*((45;78);(9;0))
(1035 3510
 27 0)