Floor: Difference between revisions

From The K Language Wiki
Content added Content deleted
("Add category")
("Add all appropriate categories to each verb")
Line 18: Line 18:


[[Category:Operator verbs]]
[[Category:Operator verbs]]
[[Category:Verbs]]
[[Category:Primitives]]

Revision as of 03:15, 9 July 2022

Floor
_x

The floor function is used to round numbers down in K.

Flooring is a no-op on integers, meaning that they remain the same.

The floor primitive is right atomic.

A ceiling function (round up) can be made with floor using -_-.

 _3
3

 _-3.7 4.789 80 0n
-4 4 80 0N