Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Integer division and remainder are defined by the following relation:
- A = (A/B) * B + (A rem B)
- 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:
- (–A)/B = – (A/B) = A/(–B)
- 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:
- A = B * N + (A mod B)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement