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)
Thu, Sep 17, 7:21 AM
Unknown Object (File)
Mon, Sep 14, 3:25 AM
Unknown Object (File)
Mon, Sep 14, 3:13 AM
Unknown Object (File)
Mon, Sep 14, 3:10 AM
Unknown Object (File)
Sun, Aug 30, 7:23 PM
Unknown Object (File)
Sat, Aug 29, 5:09 AM
Unknown Object (File)
Aug 25 2026, 8:34 PM
Unknown Object (File)
Aug 25 2026, 8:33 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