Advertisement
ZirconiumX

Untitled

Nov 24th, 2019
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. Integer division and remainder are defined by the following relation:
  2.  
  3. A = (A/B) * B + (A rem B)
  4.  
  5. where (A rem B) has the sign of A and an absolute value less than the absolute value of B. Integer division satisfies the following identity:
  6.  
  7. (–A)/B = – (A/B) = A/(–B)
  8.  
  9. The result of the modulus operation is such that (A mod B) has the sign of B and an absolute value less than the absolute value of B; in addition, for some integer value N, this result shall satisfy the relation:
  10.  
  11. A = B * N + (A mod B)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement