dc(1): fix modulo operations with fractional inputs
ClosedPublic

Authored by asomers on Dec 6 2017, 4:08 AM.

Details

Summary

dc(1): fix modulo operations with fractional inputs

Our dc(1) has never correctly calculated remainders with fractional inputs.
Both bmod and bdivmod seem to have copy/pasted code from bdiv, which results
in the remainder having the wrong output scale.

Test Plan

Test cases added

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
asomers created this revision.Dec 6 2017, 4:08 AM
pfg accepted this revision.Dec 7 2017, 1:11 AM
This revision is now accepted and ready to land.Dec 7 2017, 1:11 AM
This revision was automatically updated to reflect the committed changes.