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
F161343601: D13390.id36284.diff
Fri, Jul 3, 12:21 AM
F161337807: D13390.id36328.diff
Thu, Jul 2, 11:01 PM
Unknown Object (File)
Wed, Jul 1, 7:28 AM
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
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 Passed
Unit
No Test Coverage
Build Status
Buildable 13373
Build 13605: arc lint + arc unit