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)
Tue, Oct 28, 3:54 PM
Unknown Object (File)
Tue, Oct 28, 3:54 PM
Unknown Object (File)
Tue, Oct 28, 3:54 PM
Unknown Object (File)
Tue, Oct 28, 10:11 AM
Unknown Object (File)
Thu, Oct 23, 2:40 AM
Unknown Object (File)
Thu, Oct 16, 5:01 AM
Unknown Object (File)
Sep 18 2025, 11:26 AM
Unknown Object (File)
Sep 7 2025, 8:01 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 Passed
Unit
No Test Coverage
Build Status
Buildable 13373
Build 13605: arc lint + arc unit