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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 28 Jul 2026 05:06PM UTC
Jobs 1
Files 644
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

28 Jul 2026 04:25PM UTC coverage: 85.457% (-0.006%) from 85.463%
30378191769

push

github

web-flow
feat(lns): add fma(a,b,c) for the log-domain number systems (lns + dbns) (#1237)

* feat(lns/dbns): add fma(a,b,c) for the log-domain number systems

Neither lns (logarithmic) nor dbns (double-base logarithmic) had an fma. Add a free
sw::universal::fma for both: widen to double, form a*b + c with std::fma, and round
the result once into the log-domain encoding via the value constructor. In the log
domain the multiply is (near-)exact (an exponent addition) while the ADD is the lossy
step; forming the fused product-sum in the wide intermediate makes the add-domain
rounding happen exactly once. An lns/dbns significand is far narrower than double's
53 bits, so double(x) is exact, the product is exact in double, and the double ->
log-domain rounding is the single rounding that determines the result. NaN propagates
via the value constructor (neither type has an infinity).

Wiring: lns follows the standard math/ + mathlib pattern. dbns had no wired math
layer -- its mathlib.hpp references a non-existent math/ subdirectory and is disabled
-- so fma lands in the orphan math_functions.hpp, which dbns.hpp now includes (the
broken mathlib stays disabled).

Tests (static/logarithmic/{lns,dbns}/math/fma.cpp) validate correctly-rounded
agreement with an INDEPENDENT fused long-double reference (std::fmal) and NaN
propagation. Log-domain encodings do not represent nice linear values exactly, so
exactness is not asserted. Note: the reference must itself be fused -- a naive
long-double a*b + c double-rounds and amplifies cancellation, which is exactly what
fma avoids (a catch during development confirmed fma is the more accurate one).
Green on gcc + clang.

Resolves #1196
Relates to #1189

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(lns/dbns): fail on unexpected NaN; document binary64 range limit (CodeRabbit)

- Remove the r.isnan() early-continue in the correctly-rounded loops: inputs are
  finite, so a NaN result is a real regression a... (continued)

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

4 existing lines in 1 file now uncovered.

46863 of 54838 relevant lines covered (85.46%)

6791872.28 hits per line

Coverage Regressions

Lines Coverage ∆ File
4
89.23
-1.1% include/sw/universal/number/posito/posito_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 30378191769.1 28 Jul 2026 05:06PM UTC 644
85.46
GitHub Action Run
Source Files on build 30378191769
  • Tree
  • List 644
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30378191769
  • 8a75b3fc on github
  • Prev Build on main (#30371151083)
  • Next Build on main (#30380499927)
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