floor truncate ceiling round
mod:floorの余り
rem:truncateの余り
floor:商-∞
truncate:商0
ceiling:商+∞
round:商を近い整数
x < 0の場合
(truncate x)と(ceiling x)は同じ
x > 0の場合
(floor x)と(truncate x)は同じ
例
'FLOOR (/ 3 2) is 1 1/2 'TRUNCATE (/ 3 2) is 1 1/2 'CEILING (/ 3 2) is 2 -1/2 'ROUND (/ 3 2) is 2 -1/2 'FLOOR (/ -3 2) is -2 1/2 'TRUNCATE (/ -3 2) is -1 -1/2 'CEILING (/ -3 2) is -1 -1/2 'ROUND (/ -3 2) is -2 1/2 'FLOOR (/ 4 2) is 2 0 'TRUNCATE (/ 4 2) is 2 0 'CEILING (/ 4 2) is 2 0 'ROUND (/ 4 2) is 2 0