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

stillwater-sc / universal / 43654278775
89%
master: 84%

Build:
Build:
LAST BUILD BRANCH: fix/fixpnt-quire-resolve-saturates
DEFAULT BRANCH: master
Ran 14 Nov 2026 11:53PM UTC
Jobs 1
Files 893
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

14 Nov 2026 11:38PM UTC coverage: 89.141% (+0.01%) from 89.127%
43654278775

push

github

web-flow
fix(dfixpnt): exact conversion from double, correctly rounded conversion to double and float (#2078)

dfixpnt(double) formed v * 10^radix as a double product, which rounds once it
reaches 2^53, and read the digits off the rounded double: dfixpnt<50,40>(0.5)
held 0.50000000000000000000009, dfixpnt<50,10>(2^60) ended in ...847000, and
even dfixpnt<20,10> values were wrong from the 9th fraction digit. The comment
called this intrinsic to a double; it is not, since a double is exactly m * 2^e.

- operator=(double) splits the double exactly into m * 2^e (scaling by powers
  of two, so it stays constexpr without frexp or bit_cast) and forms
  m * 10^radix * 2^e on a decimal digit register: doubling for e >= 0, halving
  for e < 0 with the last dropped bit kept. It rounds once, ties away from zero
  as before, and saturates to all nines as before. A magnitude that rounds to 0
  is +0; it was -0 for a negative input.
- to_double() summed digit * 10^i in double and divided by 10^radix, rounding
  at each step. It now scales the digits by a power of two into a 63-bit
  integer exactly, in decimal, and rounds once to nearest, ties to even,
  subnormals and overflow to infinity included.
- operator float() rounds once to float's grid, not through double.
- The static_assert that limited double conversion to ndigits <= 308 is gone:
  it guarded the double products that no longer exist.

Tests: new static/fixpnt/decimal/conversion/ieee754.cpp checks both directions
against an integer<> rational reference over random values (narrow and wide,
including saturation), dyadic values k 2^-j against the digits of k 5^j and
back, ties in both directions, float's double rounding, subnormals in
dfixpnt<1100,1080>, infinity, NaN, the +0 rule, and constexpr use. On main
the random and dyadic checks fail over 1000 cases each, and the wide types do
not compile.

Resolves #2076

BEHAVIOUR-CHANGE: dfixpnt conversion from double is exact (rounded once, ties away from zero), conversi... (continued)

116 of 117 new or added lines in 1 file covered. (99.15%)

63273 of 70981 relevant lines covered (89.14%)

11977583.92 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
93.89
2.16% include/sw/universal/number/dfixpnt/dfixpnt_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 43654278775.1 14 Nov 2026 11:53PM UTC 893
89.14
GitHub Action Run
Source Files on build 43654278775
  • Tree
  • List 893
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #43654278775
  • 0a3ef00c on github
  • Prev Build on main (#43646807960)
  • Next Build on main (#43678966922)
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