(42, all flavours) Integer Division - how?
|
12-24-2020, 11:12 AM
Post: #57
|
|||
|
|||
RE: (42, all flavours) Integer Division - how?
Since c ≠ 0, or 5 (mod 10), we can rewrite the equality as:
0 ≡ (2*Qq ± 1) * (2c) (mod 10), where c = last non-zero decimal digit of Rr 0 ≡ (2*Qq ± 1) * c (mod 5) +1 case: Qq ≡ 2 (mod 5) −1 case: Qq ≡ 3 (mod 5) But, -1 case should return Qq-1. This meant half-way case floor-divide quotient always in 5n+2 form PHP Code: function idiv7b(Cc00, Xx) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 9 Guest(s)