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)
Fri, Aug 8, 1:40 PM
Unknown Object (File)
Jun 22 2025, 4:44 PM
Unknown Object (File)
Jun 22 2025, 12:14 PM
Unknown Object (File)
Jun 21 2025, 7:50 PM
Unknown Object (File)
Jun 21 2025, 7:23 PM
Unknown Object (File)
May 28 2025, 10:52 AM
Unknown Object (File)
May 7 2025, 12:04 AM
Unknown Object (File)
Apr 24 2025, 10:45 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