Add div_rem helper method with docs and tests