Floored Arithmetics#

If z is any real number, then the floor of z is the greatest integer less than or equal to z.

  • The floor of +.6 is 0
  • The floor of -.4 is -1

floored division#

Integer division in which the remainder carries the sign of the divisor or is zero, and the quotient is rounded to its arithmetic floor. Note that, except for error conditions, n1 n2 SWAP OVER /MOD ROT * + is identical to n1.


dividend divisor remainder quotient
10 7 3 1
-10 7 4 -2
10 -7 -4 -2
-10 -7 -3 1

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 03-Feb-2023 16:21 by Carsten Strotmann  
G’day (anonymous guest) My Prefs
© 2010-2021 AtariWiki
All content in the Wiki is licensed under Creative Commons Share Alike License, unless otherwise noted.
JSPWiki v2.8.3