• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stillwater-sc / universal / 34789736838
86%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 13 Sep 2026 11:54PM UTC
Jobs 1
Files 667
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Sep 2026 11:27PM UTC coverage: 85.748% (+0.02%) from 85.732%
34789736838

push

github

web-flow
fix(dfloat): round to nearest, ties to even, everywhere (#1490)

numeric_limits<dfloat>::round_style declares round_to_nearest, and IEEE 754-2008
decimal arithmetic defaults to roundTiesToEven, but dfloat mixed three policies:
+ - * / truncated (decimal32 2/3 = 0.6666666), conversion from double rounded half
up (0.6666667), parse and str(precision) truncated, and the far-gap shortcut in +/-
returned the nearest value. Every path now rounds to nearest, ties to even.

- round_to_ndigits() rounds a significand of either width to ndigits from the digits
  it drops plus a sticky flag (a nonzero amount below the last digit), carrying
  99...9 into a new digit. normalize_and_pack() and normalize_wide_and_pack() call
  it and check for overflow after rounding, so a carry past maxpos gives inf.
- + and - round the exact double-width sum. The shortcut returns the larger operand
  only when the smaller one's leading digit is more than ndigits + 1 below it, where
  the nearest value is the larger operand with either sign (the smaller one is under
  a tenth of a unit in the last place). Closer operands take the exact sum.
- * rounds the exact double-width product; it used to trim by truncation.
- / carries an inexact quotient to ndigits + 1 digits, a guard digit, and passes the
  remainder as sticky.
- Parse keeps one guard digit past the precision, and any nonzero digit after it
  sets sticky.
- Conversion from double rounds its scaled value half to even instead of half up.
- str(precision), and so operator<< under std::setprecision, round the printed digits
  to nearest with ties to even, carrying 9s. std::scientific with
  std::setprecision(3) printed 2/3 as 6.66e-1; it now prints 6.67e-1.
- Conversion from integers rounds through normalize_and_pack. decimal32 from
  123456789 is 1.234568e8, where it was 1.234567e8.

Tests move to the new policy:
- arithmetic/oracle.cpp: every result must be the exact value rounded half-even on
  digit strings. Division runs to... (continued)

56 of 56 new or added lines in 1 file covered. (100.0%)

8 existing lines in 1 file now uncovered.

43639 of 50892 relevant lines covered (85.75%)

7573128.04 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
93.06
-0.52% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 34789736838.1 13 Sep 2026 11:54PM UTC 667
85.75
GitHub Action Run
Source Files on build 34789736838
  • Tree
  • List 667
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34789736838
  • 4bed7543 on github
  • Prev Build on main (#34785139526)
  • Next Build on main (#34792158804)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc