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

stillwater-sc / universal / 25826954714
84%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 13 May 2026 09:45PM UTC
Jobs 1
Files 648
Run time 2min
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 May 2026 09:17PM UTC coverage: 83.906% (-0.01%) from 83.92%
25826954714

push

github

web-flow
fix(posit): replace flaky random division test with targeted bit-pattern tests (#833)

* fix(posit): replace flaky random division test with targeted bit-pattern tests

The fast posit<32,2> division test was occasionally failing in heavy-tier CI
(observed in #774, isolated to the division regression) and passing on
`ctest --rerun-failed`.  Root cause: the randomized test uses double as a
reference oracle, but posit<32,2> has 28 mantissa bits, so the true
mathematical quotient a/b can have up to 56 significant bits.  Double
provides only 53 mantissa bits.  When the random generator happened to
pick an operand pair whose true quotient lay in the 53-56-bit precision
gap, the double oracle rounded while the posit hardware (which works in
its own high-precision internal representation) did not -- producing a
real bit-pattern mismatch and a real CI failure that disappeared on
re-run with a different seed.

This is a precision-oracle problem, not a posit defect.

Replaced the OPCODE_DIV invocation of `VerifyBinaryOperatorThroughRandoms`
in both REGRESSION_LEVEL_1 and REGRESSION_LEVEL_3 with a new local helper
`VerifyTargetedDivision_posit32_2(reportTestCases)`.  The helper exercises
173 hand-picked operand pairs whose mathematical quotient is exactly
representable in BOTH double and posit<32,2>.  No statistical oracle, no
tolerance -- bit-pattern equality is rigorous.

Test categories:
- A (49)  power-of-2 grid, all positive (2^i / 2^j, i,j in [-3, 3])
- B (64)  signed power-of-2 combinations ({1,2,4,8} x {1,2,4,8} x signs)
- C (10)  identity a / 1 = a
- D (10)  self-division a / a = 1
- E  (8)  a / -a = -1
- F  (6)  0 / a = 0
- G  (6)  NaR-producing cases (a/0, NaR/x, x/NaR; under
          POSIT_THROW_ARITHMETIC_EXCEPTION=1 either NaR result or
          exception is accepted)
- H (12)  exact dyadic fractions (1.5/0.5=3, 2.5/2=1.25, etc.)
- I  (8)  wider-range power-of-2 (2^+/-50 .. 2^+/-100, well within
          posit<32,2>'s dynamic range)

Powers of 2 ... (continued)

45899 of 54703 relevant lines covered (83.91%)

6468180.1 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
5
86.9
-0.22% include/sw/universal/number/posit1/specialized/posit_32_2.hpp
Jobs
ID Job ID Ran Files Coverage
1 25826954714.1 13 May 2026 09:45PM UTC 648
83.91
GitHub Action Run
Source Files on build 25826954714
  • Tree
  • List 648
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25826954714
  • e162292c on github
  • Prev Build on main (#25811972750)
  • Next Build on main (#25944190078)
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