let
round_down_to_r ~max:m ~r ~modu =
add (round_down_to_zero (sub m r) modu) r