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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 22 May 2026 02:19PM UTC
Jobs 1
Files 651
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

22 May 2026 01:52PM UTC coverage: 84.242% (+0.01%) from 84.231%
26291830638

push

github

web-flow
perf(elreal): Phase L.2.a -- depth-2 refinement for division (#918)

* perf(elreal): Phase L.2.a -- depth-2 refinement for division

Phase L.2.a of follow-up epic #903 (#906). Adds depth-2 to elreal::operator/
via a new gen_newton_div variant alternative, with result-data access
plumbed to evaluate_generator so the depth-2 step can read c_0 and c_1.

Algorithm
---------

At depth 2, the remainder R = a - b * (c_0 + c_1) expands as:

    R = (a.at(0)+a.at(1)+a.at(2)+...) - (b.at(0)+b.at(1)+b.at(2)+...) * (c_0+c_1)

Grouping by magnitude, the O(eps^2) terms (depth-2 of R) are:

    R.at(2) ~= a.at(2) - b.at(2) * c_0 - b.at(1) * c_1

Solving for c_2 by setting R.at(2) -> 0 at higher order:

    c_2 = (a.at(2) - b.at(2) * c_0 - b.at(1) * c_1) / b.at(0)

Behaviour
---------

- Pure-double inputs (a.at(2) = b.at(1) = b.at(2) = 0): c_2 = 0.
  Semantically correct for a lazy-real implementation -- we don't
  invent precision the operands didn't carry. qd's algorithm captures
  more bits here because it runs Newton iteration to a fixed target
  precision; the elreal contract is "as deep as the operands go".
- Multi-component inputs (elreal_pi() / elreal_e() etc.): c_2 picks
  up the operand depth-2 contributions. Verified non-overlapping
  property holds (|c_2| <= ulp(c_1) / 2).

Depth-3+ for / requires depth-2+ support in *, +, -, which is broader
follow-up scope.

Files
-----

- include/sw/universal/number/elreal/elreal_data.hpp -- new
  gen_newton_div variant alternative. evaluate_generator signature
  updated to take a const elreal& reference for accessing the
  result's already-materialised components.

- include/sw/universal/number/elreal/elreal_impl.hpp -- operator/
  now installs gen_newton_div instead of gen_binary_linear. The
  evaluator handles k=1 (Phase L.1 formula) and k=2 (Phase L.2.a
  formula). k >= 3 returns 0.

- elastic/elreal/arithmetic/division_depth2.cpp -- new test
  validating:
    * pure-double inputs yield c_2 = 0
    * multi-compone... (continued)

46947 of 55729 relevant lines covered (84.24%)

5285606.41 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
93.63
-0.47% include/sw/universal/number/cfloat/cfloat_impl.hpp
1
80.8
0.0% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
1
90.06
-0.28% include/sw/universal/number/posito/posito_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 26291830638.1 22 May 2026 02:19PM UTC 651
84.24
GitHub Action Run
Source Files on build 26291830638
  • Tree
  • List 651
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26291830638
  • 5934b22b on github
  • Prev Build on main (#26289624672)
  • Next Build on main (#26306743851)
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