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

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

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

03 Nov 2026 11:20PM UTC coverage: 88.537% (+0.03%) from 88.512%
41738383195

push

github

web-flow
fix(erational,edecimal): honour the sign in comparisons and integer conversion (#1913)

erational keeps its sign in a flag and non-negative edecimal magnitudes
in the digits. Several paths ignored the flag or put the sign in the
digits, so negative values converted and compared wrong (#1908), and the
comparisons also mishandled the constant-initialized zero (#1909).

erational:
- to_signed() returned numerator / denominator, so int(erational(-7))
  was 7. It now applies the sign; to_unsigned() takes the same signed
  value and wraps modulo 2^n, as edecimal and C++ integer conversion do.
- operator== compared only the digits, so x == -x, and operator<
  compared magnitudes, so the order was |a| < |b|. All six operators now
  go through one three-way compare() on values: the sign orders them,
  +0 == -0 (0 * -3 leaves a sign-flagged zero, which to_ieee754 turns
  into -0.0), an unreduced 2/4 equals 1/2, and the constant-initialized
  zero (empty digit vectors) is 0.
- A NaN (0/0, or an n/0 from setdenominator or erational(n, 0)) is
  unordered as in IEEE-754: every comparison is false except !=. Before,
  NaN == NaN was true and NaN >= x was !(NaN < x).
- long > erational had its operands swapped. The long overloads now
  forward to the erational operators.
- erational(int64_t n, uint64_t d) stored the signed n in the digits AND
  set the flag (printing "--3/2"), and a negative d wrapped to
  2^64 - |d|. It is now a constructor over any two integer types that
  stores magnitudes and the sign, so (-3, 2) and (3, -2) are both -3/2.
  It still does not reduce: (8, 18) keeps 8/18, as sqrt expects.
- convert_signed() negated with -rhs, which overflowed on INT64_MIN.

edecimal:
- to_int() and to_long() narrowed through short: int(edecimal(100000))
  was -31072, and on LP64 long(edecimal(-1e12)) was -4096.
- to_long_long() accumulated in a signed long long, overflowing (UB) on
  INT64_MIN's magnitude 2^63 and on values above LLONG_MAX, and
  to_ulong_long() we... (continued)

61 of 62 new or added lines in 2 files covered. (98.39%)

1 existing line in 1 file now uncovered.

56276 of 63562 relevant lines covered (88.54%)

8932634.52 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
96.08
0.95% include/sw/universal/number/erational/erational_impl.hpp

Coverage Regressions

Lines Coverage ∆ File
1
35.02
0.32% include/sw/universal/verification/test_suite_randoms.hpp
Jobs
ID Job ID Ran Files Coverage
1 41738383195.1 03 Nov 2026 11:39PM UTC 773
88.54
GitHub Action Run
Source Files on build 41738383195
  • Tree
  • List 773
  • Changed 5
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41738383195
  • bba0a2f2 on github
  • Prev Build on main (#41715140830)
  • Next Build on main (#41752957759)
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