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

stillwater-sc / universal / 30672136635
85%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 31 Jul 2026 11:32PM UTC
Jobs 1
Files 600
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

31 Jul 2026 11:10PM UTC coverage: 85.23% (-0.02%) from 85.249%
30672136635

push

github

web-flow
fix(posit): clear -Wsign-conversion in posit_impl convert_ (#1281) (#1286)

Sub-issue of Epic #1279. Four sites in the posit encode/rounding path
(convert_), all value-preserving:

- `exponent = e % (1ull << es)`: the signed scale `e` was already promoted
  to unsigned long long by the modulo (the other operand is 1ull); make it
  explicit. This is correct for a power-of-two modulus -- 2^64 mod 2^es is
  0, so the unsigned reinterpretation of a two's-complement negative e
  yields exactly the low es bits, which is the posit exponent field (and
  matches the arithmetic-shift regime split e >> es).
- `regime <<= es + nrFbits + 1u`, `exponent <<= nrFbits + 1u`,
  `pt_bits <<= pt_len - len`: unsigned shift-amount / left-align distance
  flowing into operator<<=(int); each is >= 1 and small by construction.
  Cast to int explicitly.

Proven behavior-neutral: optimized assembly (g++ -O2) for a TU
instantiating convert_ across posit<8,0>/<16,1>/<32,2>/<64,3> is
byte-for-byte identical before and after -- the casts are explicit forms
of conversions the compiler already performed implicitly.

The dead `convert_to_bb` (inside `#ifdef TBD`, never called) has the same
idiom but does not compile, so it is intentionally left untouched.

Verified posit_impl -Wsign-conversion AND -Wconversion clean on gcc AND
clang; posit conversion/assignment/multiplication regressions PASS on
both. (The posit<64,2..4> division failures are pre-existing on main --
identical counts with the fix reverted -- and out of scope here.)

Relates to #1279
Resolves #1281

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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

36 existing lines in 4 files now uncovered.

41708 of 48936 relevant lines covered (85.23%)

7271799.74 hits per line

Coverage Regressions

Lines Coverage ∆ File
15
80.9
1.49% internal/blockbinary/logic/shift_left.cpp
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
7
94.69
0.01% include/sw/universal/internal/blockbinary/blockbinary.hpp
4
94.59
0.02% include/sw/universal/internal/blocksignificand/blocksignificand.hpp
Jobs
ID Job ID Ran Files Coverage
1 30672136635.1 31 Jul 2026 11:32PM UTC 600
85.23
GitHub Action Run
Source Files on build 30672136635
  • Tree
  • List 600
  • Changed 5
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30672136635
  • 31569157 on github
  • Prev Build on main (#30660486273)
  • Next Build on main (#30672084664)
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