You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Google I can find lots of old arguments over how integer division should work in Rust, but I cannot find anything in the reference, the API docs for the integer types, or the API docs for the Div trait that says what was actually decided. (And the documentation seems to imply that /, checked_div, and wrapping_div may not all do the same thing.) This is further confused by the integer type documentation apparently sometimes using / to refer to integer division and sometimes to mathematical division. (I can't come up with out any other reasonable interpretation of floor(self / other) in the wrapping_div documentation.) It would be nice if this were clearly documented somewhere, since this varies between languages and is one of the main confusions with integer arithmetic.