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
F146818492: D13390.id36284.diff
Thu, Mar 5, 9:03 PM
F146733075: D13390.id.diff
Thu, Mar 5, 3:14 AM
Unknown Object (File)
Sun, Mar 1, 2:50 PM
Unknown Object (File)
Sun, Mar 1, 8:55 AM
Unknown Object (File)
Sun, Mar 1, 5:44 AM
Unknown Object (File)
Sun, Feb 8, 11:31 AM
Unknown Object (File)
Sat, Feb 7, 7:28 PM
Unknown Object (File)
Jan 25 2026, 12:31 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