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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 21 May 2026 12:24PM 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

21 May 2026 11:58AM UTC coverage: 84.227%. Remained the same
26224499819

push

github

web-flow
feat(elreal): Phase E.2 -- sqrt + hypot with depth-1 EFT refinement on sqrt (#894)

* feat(elreal): Phase E.2 -- sqrt + hypot with depth-1 EFT refinement on sqrt

Phase E.2 of epic #873 (resolves #888). The second math sub-issue:
square root via Newton-style EFT residual at depth 1, plus a depth-0
hypot via std::hypot for overflow safety.

sqrt(const elreal&):
  - Depth 0: c0 = std::sqrt(a.at(0)) (IEEE-754 correctly rounded)
  - Depth 1: Newton residual c1 ~= (a - c0^2) / (2*c0). a - c0^2 is
    computed with two_prod (giving c0^2 = prod_hi + prod_err exactly),
    then a single double subtraction picks up the operand's depth-1
    correction a.at(1). The division by 2*c0 is plain double arithmetic
    on the elreal-internal numerator, NOT a lazy elreal divide -- so we
    are not blocked by Phase F's reciprocal-stream work.
  - Depth 2+: 0.0 (documented limitation; full Heron iteration on the
    lazy stream lands in Phase F).
  - Negative argument: throws elreal_negative_sqrt_arg when
    ELREAL_THROW_ARITHMETIC_EXCEPTION is set; otherwise returns NaN
    via std::sqrt(negative double).

hypot(const elreal&, const elreal&):
  - Depth 0: c0 = std::hypot(a.at(0), b.at(0)) -- handles overflow,
    signed zero, infinities, and NaN per IEEE-754 conventions. The
    overflow-protected algebraic form (max(|a|,|b|) * sqrt(1 + (min/max)^2))
    is built into the standard library implementation.
  - Depth 1+: deferred. Either an overflow-protected algebraic form
    walked at depth 1, or sqrt(a*a + b*b) when neither operand is near
    overflow -- a small follow-up.

Tests under elastic/elreal/math/:
  sqrt.cpp        -- perfect squares, non-square cross-validation vs
                     std::sqrt, round-trip sqrt(a)^2 ~= a, sqrt(2)
                     matches std::numbers::sqrt2_v, depth-1 propagation
                     on rational input, negative -> NaN, special values
  sqrt_throw.cpp  -- elreal_negative_sqrt_arg in the throw mode (separate
           ... (continued)

46939 of 55729 relevant lines covered (84.23%)

5281275.59 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
89.78
-0.55% include/sw/universal/number/posito/posito_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 26224499819.1 21 May 2026 12:24PM UTC 651
84.23
GitHub Action Run
Source Files on build 26224499819
  • Tree
  • List 651
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26224499819
  • dd361065 on github
  • Prev Build on main (#26219049742)
  • Next Build on main (#26229262955)
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