Post ASorqRZj3CwsmSTSTo by clarfonthey@toot.cat
(DIR) More posts by clarfonthey@toot.cat
(DIR) Post #ASorqRZj3CwsmSTSTo by clarfonthey@toot.cat
2023-02-18T22:51:22Z
0 likes, 1 repeats
As part of the #RustLang tracking issue on extra integer division methods, we've been discussing the relevance of flooring division, ceiling division, and their remainders.Right now, Rust has the standard truncating division (round toward zero) and Euclidean division (do whatever makes the remainder positive), but there's debate on how relevant the flooring and ceiling versions of division are, and whether their remainders are useful.It's been brought up that flooring division is useful for date calculations (rounding down to multiples of 400, 100, or 4 years for date operations, then using the remainder for smaller intervals) but it's unclear how useful ceiling division is.Do you know of a useful algorithm that requires ceiling division and its remainder? Would love some comments to share on the discussion.Tracking issue: https://github.com/rust-lang/rust/issues/88581#Math #Maths #Mathematics #Mathstodon