(42, all flavours) Integer Division - how?
|
12-13-2020, 04:21 PM
(This post was last modified: 12-13-2020 04:22 PM by Albert Chan.)
Post: #15
|
|||
|
|||
RE: (42, all flavours) Integer Division - how?
(12-13-2020 01:18 PM)Albert Chan Wrote: We had assumed q never overflow, which results in |r| ≤ 1 Assuming q is correctly rounded (mode round-to-nearest), r = 0 or -1 The code is simplified to correct, or not correct. PHP Code: function idiv3(a,b) -- assumed b > 0 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)