slightly changing divround scalar algo to avoid integer overflow
Merge pull request #857 from jtlap/remainder_divround

slightly changing divround scalar algo to avoid integer overflow