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

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

Build:
Build:
LAST BUILD BRANCH: fix/issue-2132-rational-exact-saturating
DEFAULT BRANCH: master
Ran 17 Oct 2026 07:33PM UTC
Jobs 1
Files 731
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

17 Oct 2026 07:16PM UTC coverage: 86.781% (+0.02%) from 86.763%
39061751147

push

github

web-flow
feat(lindex): correctly rounded + - * / and reciprocal (#1349 part 4) (#1711)

Arithmetic stays in the psi domain and never forms an operand value:

- x + y, x - y: the Clenshaw-Olver sequences of the shared kernel
  (#1693), with the expm1 form for a difference; x - x is exactly 0
- x * y: psi(XY) = 1 + psi(phi(x - 1) + phi(y - 1)) for x, y >= 1
- x / y: psi(X/Y) = 1 + psi(phi(x - 1) - phi(y - 1)) for x >= y >= 1,
  and X/Y = e^-D at level 0 for x < y
- a level-0 operand g: ln g < 0 stands in for phi(. - 1), so a product
  is a difference one level down while it stays above 1, and X * g at
  level 0 below; two level-0 operands multiply, and divide to a quotient
  below 1, exactly in integers (a 128-bit product without __int128, and
  long division)
- reciprocal() is 1 / x; the header documents why it is awkward (1/X
  underflows into level 0, the asymmetry SLI #1350 fixes)
- NaR propagates, results saturate at maxpos, and x / 0 is NaR or
  throws lindex_divide_by_zero under LINDEX_THROW_ARITHMETIC_EXCEPTION

Rounding is to nearest even on the psi grid, once. The working type is
double for nbits <= 32 and dd_cascade above, per the design doc. A
double result within 2^-40 of a midpoint is evaluated again in
dd_cascade: over 4e8 lindex<32,3> pairs that retry ran for 1 result in
1200 and changed 13, so nbits <= 32 is correctly rounded. The design
doc records the decision.

Tests compare encodings for equality against
tools/generators/lindex_arithmetic_gen.py (mpmath, 600 bits, the plain
sequences through the level-down identities, cross-checked against
direct evaluation to 2^-200 wherever the values can be formed):
all 65536 signed pairs of lindex<8,3> per operation, sampled pairs of
lindex<12,3>, <16,3>, <32,3> (with 12 of the retry cases), <64,3> and
<16,2>, identities, and the exception guard.

Resolves #1695

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

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

8 existing lines in 1 file now uncovered.

49881 of 57479 relevant lines covered (86.78%)

10416072.22 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
96.37
-0.32% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 39061751147.1 17 Oct 2026 07:33PM UTC 731
86.78
GitHub Action Run
Source Files on build 39061751147
  • Tree
  • List 731
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39061751147
  • f32e49a9 on github
  • Prev Build on main (#39055757376)
  • Next Build on main (#39065550828)
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