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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 21 May 2026 03:54AM 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 03:27AM UTC coverage: 84.229% (+0.02%) from 84.211%
26203636807

push

github

web-flow
feat(elreal): Phase D -- sign, compare, ordering with refinement budget (#886)

* feat(elreal): Phase D -- sign, compare, ordering with refinement budget

Phase D of epic #873 (resolves #877): comparison and sign determination
on the lazy stream, with a per-call refinement budget that controls how
many components to materialise before declaring the value indistinguishable
from zero.

New API surface in include/sw/universal/number/elreal/elreal_impl.hpp:

  inline constexpr std::size_t elreal_default_budget = 8;

  int sign(const elreal& v, std::size_t budget = elreal_default_budget);
  int compare(const elreal& a, const elreal& b,
              std::size_t budget = elreal_default_budget);

  bool operator< (const elreal& a, const elreal& b);
  bool operator<=(const elreal& a, const elreal& b);
  bool operator> (const elreal& a, const elreal& b);
  bool operator>=(const elreal& a, const elreal& b);
  bool operator==(const elreal& a, const elreal& b);
  bool operator!=(const elreal& a, const elreal& b);

Sign determination algorithm (McCleeary 2019, dissertation Sec. 4.2):

For a normalized elreal with components c_0, c_1, ..., c_{N-1} satisfying
the non-overlapping property |c_{i+1}| <= ulp(c_i)/2, the sign of the
true value equals the sign of the first non-zero component. The remaining
components are corrections smaller than the leading non-zero by at least
one bit each, so their sum cannot flip the sign. The algorithm walks
at(k) for k = 0..budget-1 and returns the sign of the first non-zero
component found; if all are zero, the value is treated as zero "within
budget" (the canonical undecidable case is collapsed to a budgeted
answer the caller can tighten).

Special values:
  NaN  -- sign() returns 0 (unordered); ordering operators all return
          false; != returns true (matching IEEE-754).
  +/-inf -- sign returns +/-1 without consulting the budget.

IEEE-754 ordering: NaN is unordered, so <, <=, >, >=, == all return
false when either operand ... (continued)

46940 of 55729 relevant lines covered (84.23%)

5289689.31 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26203636807.1 21 May 2026 03:53AM UTC 651
84.23
GitHub Action Run
Source Files on build 26203636807
  • Tree
  • List 651
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26203636807
  • abda31ec on github
  • Prev Build on main (#26202799642)
  • Next Build on main (#26219049742)
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