Page MenuHomeFreeBSD

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

Authored by asomers on Dec 6 2017, 4:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 29, 6:26 PM
Unknown Object (File)
Mon, Jun 29, 3:41 AM
Unknown Object (File)
Thu, Jun 25, 3:24 PM
Unknown Object (File)
Fri, Jun 12, 5:15 PM
Unknown Object (File)
Apr 27 2026, 8:46 AM
Unknown Object (File)
Apr 19 2026, 5:54 PM
Unknown Object (File)
Apr 17 2026, 4:06 AM
Unknown Object (File)
Apr 15 2026, 11:56 PM
Subscribers

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 - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable