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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 26 May 2026 11:18PM UTC
Jobs 1
Files 661
Run time 1min
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

26 May 2026 10:28PM UTC coverage: 84.011% (-0.08%) from 84.087%
26478780477

push

github

web-flow
fix(ereal): deliver extended precision in mathlib transcendentals (#1002) (#1004)

* fix(ereal): deliver extended precision in mathlib transcendentals (#1002)

Root cause: every transcendental that used a math constant initialized it from
a double literal -- e.g. `Real pi(3.14159...100 digits...)` or `Real ln2(...)`.
A double literal carries only ~16 digits, so the long string was truncated
before the ereal saw it, capping sin/cos/exp2/exp10/log2/log10/... at double
precision regardless of maxlimbs.

Fix:
- ereal_constants.hpp: real high-precision constants. pi, ln2, ln10 are parsed
  from verified decimal strings (parse() builds a true multi-component
  expansion); everything else is derived via exact operations (scale by powers
  of two / small ints) or extended-precision algorithms (ereal sqrt/exp/divide
  are themselves extended-precision), so correctness follows from the algorithm
  rather than hand-transcribed tail digits. Each accessor caches its value.
- mathlib.hpp: include the constants header (it was dead code -- nothing
  included it, which is why the functions inlined their own truncated copies).
- exponent.hpp / logarithm.hpp / trigonometry.hpp: use the shared
  ereal_pi/pi_2/2pi/ln2/ln10 constants instead of inline double-literal copies.

Result (verified): sin/cos/exp/log now scale with maxlimbs --
sin^2 + cos^2 - 1 == 1.8e-133, exp(ln2) - 2 == 7e-120, exp(1) == e exactly,
two independent computations of cos(0.3) agree to ~101 digits.

progressive_precision.cpp: was failing 56 (then 24) precision-scaling checks --
but several of its hardcoded MPFR reference strings were generated incorrectly
(cos(0.3)'s was wrong beyond ~16 digits; the function is correct). Redesigned to
be self-referential: each ereal<N> is measured against the function evaluated at
a higher maxlimbs, with the reference level scaled by REGRESSION_LEVEL (L1
references ereal<8> for fast CI; L4 references ereal<19>). Added the missing
MANUAL_TESTING/REGRESSION_LEVEL guar... (continued)

41 of 43 new or added lines in 6 files covered. (95.35%)

232 existing lines in 14 files now uncovered.

46820 of 55731 relevant lines covered (84.01%)

6420694.79 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
90.91
include/sw/universal/number/ereal/math/constants/ereal_constants.hpp

Coverage Regressions

Lines Coverage ∆ File
46
60.61
-21.99% internal/expansion/arithmetic/multiplication.cpp
44
57.14
-30.98% internal/expansion/arithmetic/addition.cpp
39
60.87
-13.77% internal/expansion/arithmetic/subtraction.cpp
35
66.67
-6.72% internal/expansion/arithmetic/division.cpp
18
72.73
-10.9% internal/expansion/api/scale_expansion_nonoverlap_bug.cpp
8
94.2
-2.46% include/sw/universal/internal/expansion/expansion_ops.hpp
8
93.1
1.14% internal/expansion/api/api.cpp
8
95.0
0.63% internal/expansion/api/compression.cpp
8
79.72
0.21% internal/expansion/growth/component_counting.cpp
8
84.08
0.28% internal/expansion/growth/compression_analysis.cpp
5
50.45
-4.5% include/sw/universal/verification/posit_test_suite_randoms.hpp
3
68.97
-1.4% include/sw/universal/verification/ereal_test_support.hpp
1
80.8
0.0% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
1
95.11
0.32% internal/expansion/api/expansion_ops.cpp
Jobs
ID Job ID Ran Files Coverage
1 26478780477.1 26 May 2026 11:18PM UTC 661
84.01
GitHub Action Run
Source Files on build 26478780477
  • Tree
  • List 661
  • Changed 23
  • Source Changed 19
  • Coverage Changed 21
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26478780477
  • 563b77c4 on github
  • Prev Build on main (#26409565158)
  • Next Build on main (#26480247817)
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