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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 26 Mar 2026 10:10PM UTC
Jobs 1
Files 629
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

26 Mar 2026 09:41PM UTC coverage: 84.399% (+0.02%) from 84.378%
23619415008

push

github

web-flow
feat(numeric): cross-type conversion infrastructure (#613)

* feat(convert): add cross-type conversion infrastructure for issue #197

Add universal_cast<>, mixed-type operators, and UniversalNumber concept
to enable automatic conversions between posit, cfloat, fixpnt, lns, and
integer types without module cycles.

* fix(test): clean up malformed comments in regression test guards

* fix(numeric): correct misleading long double comment in universal_convert

* test(convert): add exhaustive cfloat conversion regression tests

Add the regression tests from the PR test plan:

  LEVEL_1:
  - Exhaustive cfloat<12,4> -> cfloat<8,3>  (4096 encodings, narrowing)
  - Exhaustive cfloat<8,2>  -> cfloat<16,5> (256 encodings,  widening)
  - Exhaustive cfloat<8,3>  -> cfloat<12,4> (256 encodings,  widening)
  - Spot checks cfloat<32,8> <-> cfloat<16,5> special values
    (zero, +inf, -inf, qNaN)

  LEVEL_2:
  - Exhaustive cfloat<16,5,ttt> -> cfloat<8,3,ttt> (65536 encodings,
    saturating + subnormals + max-exp narrowing)

Also fix the regression level guards to follow the standard cmake
REGRESSION_LEVEL_OVERRIDE pattern used throughout the rest of the
test suite, replacing the hardcoded LEVEL_1=1 / LEVEL_2-4=0 block.

* fix(convert): use precision-aware intermediate to avoid double bottleneck

Replace the fixed double intermediate in universal_cast and universal_assign
with a compile-time selection via if constexpr:
  - precision <= 52 bits: use double (exact, common case)
  - precision >  52 bits: use long double (80-bit on x86/x87)

This addresses the concern that marshalling through double silently loses
precision for Universal types wider than double's 52-bit significand.
The long double path covers types up to 63 fraction bits exactly on x86;
on MSVC/ARM (where long double == double) the precision is unchanged.

Types wider than long double require an efloat/ereal intermediate or a
proper expression-template layer for AST-level type-promotion analysis.

* fix(... (continued)

34 of 34 new or added lines in 2 files covered. (100.0%)

5 existing lines in 2 files now uncovered.

44415 of 52625 relevant lines covered (84.4%)

6131075.32 hits per line

Coverage Regressions

Lines Coverage ∆ File
4
89.24
-1.13% include/sw/universal/number/posito/posito_impl.hpp
1
80.8
0.0% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
Jobs
ID Job ID Ran Files Coverage
1 23619415008.1 26 Mar 2026 10:10PM UTC 629
84.4
GitHub Action Run
Source Files on build 23619415008
  • Tree
  • List 629
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23619415008
  • cd2c483d on github
  • Prev Build on main (#23619243161)
  • Next Build on main (#23625005840)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc