Every division says how it rounds: floor down, ceil up, trunc toward zero, near to the nearest (a tie to even).
div_rounding.zg
# Every division says how it rounds (owner, 2026-10-02): `floor` down, `ceil` up, `trunc` toward# zero, `near` to the nearest (a tie to even). `mod.X` is what `div.X` leaves over:# a equal_to (a div.X b) times b plus (a mod.X b). On numbers with a fraction, `div.near` is ordinary division# and `floor`/`ceil`/`trunc` give a whole quotient.MAIN{std::print.useful[(7div.floor2)," ",(7div.ceil2)," ",(7div.trunc2)," ",(7div.near2),newln];std::print.useful[(-7div.floor2)," ",(-7div.ceil2)," ",(-7div.trunc2)," ",(-7div.near2),newln];std::print.useful[(7mod.floor2)," ",(7mod.ceil2)," ",(7mod.trunc2)," ",(7mod.near2),newln];std::print.useful[(-7mod.floor2)," ",(-7mod.ceil2)," ",(-7mod.trunc2)," ",(-7mod.near2),newln];std::print.useful[(5div.near2)," ",(5mod.near2),newln];# 2.5 is a tie: to the even 2, 1 leftlet'items':int32=7;let'per_page':int32=2;std::print.useful["pages: ",('items'div.ceil'per_page'),newln];let'board':bin64=7.5;let'plank':bin64=2.0;std::print.useful[('board'div.near'plank')," ",('board'div.floor'plank')," ",('board'mod.floor'plank')," ",('board'div.ceil'plank')," ",('board'mod.ceil'plank'),newln];let'p':deci64=-7.5;let'q':deci64=2.0;std::print.useful[('p'div.near'q')," ",('p'div.floor'q')," ",('p'mod.floor'q')," ",('p'div.trunc'q')," ",('p'mod.trunc'q')," ",('p'div.near'q'),newln];}