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

stillwater-sc / universal / 30637144130
85%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 31 Jul 2026 02:43PM UTC
Jobs 1
Files 600
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

31 Jul 2026 02:05PM UTC coverage: 85.213% (+0.005%) from 85.208%
30637144130

push

github

web-flow
fix(interval): do not return a finite enclosure for an unbounded result (#1277)

* fix(interval): do not return a finite enclosure for an unbounded result

Division by an interval containing zero has an UNBOUNDED exact result set, and
the only enclosure of it is [-inf, +inf]. interval<Scalar> signalled that with
+/-numeric_limits<Scalar>::infinity(), which assumes every Scalar HAS an
infinity. Not every one does:

  double, cfloat : has_infinity, and infinity() > max()   -> can represent
  posit          : NaR instead of infinity, and
                   numeric_limits<posit>::infinity() returns MAXPOS -- a finite
                   value indistinguishable from ordinary data
  lns            : has_infinity is correctly false, but interval called
                   infinity() without consulting the flag

So interval<posit<32,2>> returned the FINITE [-1.329e+36, 1.329e+36] for a
division whose exact result set is unbounded: an enclosure that excludes
everything beyond maxpos while claiming to contain it. Silently returning a
too-narrow enclosure is the one failure mode interval arithmetic must never
have -- every other error is conservative, this one is not.

There is no correct value to return, so the operation now throws
interval_unrepresentable_unbounded instead. That converts silent unsoundness
into a loud, catchable failure.

Adds interval<Scalar>::can_represent_unbounded, a compile-time query derived
from what infinity() actually IS rather than from the has_infinity claim,
because the two disagree for posit:

    static constexpr bool can_represent_unbounded =
        numeric_limits<Scalar>::has_infinity &&
        (numeric_limits<Scalar>::infinity() > numeric_limits<Scalar>::max());

Callers can branch on it to skip element types that cannot express the answer,
rather than discovering it at runtime.

Scope: the guard fires only for a zero-containing divisor. Ordinary division is
untouched for every Scalar (asserted in the test), as is every other ... (continued)

6 of 6 new or added lines in 2 files covered. (100.0%)

41680 of 48913 relevant lines covered (85.21%)

7267464.02 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30637144130.1 31 Jul 2026 02:43PM UTC 600
85.21
GitHub Action Run
Source Files on build 30637144130
  • Tree
  • List 600
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30637144130
  • 57a91105 on github
  • Prev Build on main (#30624996632)
  • Next Build on main (#30642798036)
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