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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 27 Jun 2026 07:35PM UTC
Jobs 1
Files 687
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

27 Jun 2026 06:54PM UTC coverage: 84.602% (-0.03%) from 84.635%
28298610954

push

github

web-flow
feat(efloat): implement logarithmic suite (log2, log10, log1p) (#1123)

* feat(efloat): implement logarithmic suite (log2, log10, log1p) (#1108)

Implement log2() (logarithm base 2) and log10() (logarithm base 10) inside math/logarithm.hpp
utilizing high-precision ln2 and ln10 constants.

Implement log1p() (natural logarithm of 1 + x) inside math/logarithm.hpp, utilizing standard
Taylor series expansion for small inputs (|x| < 0.375) to prevent catastrophic cancellation as
x -> 0.

Fix power-of-2 sign-clobbering bug in operator*=: inside the second power-of-2 bypass block,
save the original sign of *this to original_sign before the copy-assignment *this = rhs, and
evaluate the sign XOR using original_sign. This prevents the product of a power of 2 by any
negative number from erroneously becoming positive, fully resolving Taylor series convergence for
negative arguments.

Expand math.cpp to test log2(4.0), log10(100.0), and log1p() under extremely small inputs and
exceptional boundaries (-2.0 nan / -1.0 -inf).

Resolves #1108
Relates to Epic #1101, PR #1122

* fix(efloat): resolve CodeRabbit review comments on logarithm suite

1. Implement exact operator<(): replace the operator<() stub in efloat_impl.hpp with a complete,
   constexpr-compatible, standard-conforming implementation. It handles NaN unorderedness,
   zero sign equivalence, exponent scales, and lexical limb comparisons under ties. This
   makes ordering comparisons in logarithm.hpp fully functional.

2. Fix negative-infinity domain checks: replace 'x.isneg()' with 'x.sign() == -1' inside
   log(), log2(), log10(), and log1p() to ensure negative infinity is caught and converted
   to NaN with InvalidOperation instead of bypassing domain checks.

3. Implement precision-safe log1p(): replace double-casting range checks with exact
   efloat-space comparisons 'abs(x) < efloat<nlimbs>(0.375)'.

4. Implement dynamic termination: replace the hardcoded iteration cap of 100 with a
   precision-safe ... (continued)

80 of 116 new or added lines in 2 files covered. (68.97%)

5 existing lines in 2 files now uncovered.

48769 of 57645 relevant lines covered (84.6%)

6737472.27 hits per line

Uncovered Changes

Lines Coverage ∆ File
35
69.03
-30.97% include/sw/universal/number/efloat/math/logarithm.hpp
1
86.26
0.61% include/sw/universal/number/efloat/efloat_impl.hpp

Coverage Regressions

Lines Coverage ∆ File
4
89.23
-0.55% include/sw/universal/number/posito/posito_impl.hpp
1
80.58
-0.22% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
Jobs
ID Job ID Ran Files Coverage
1 28298610954.1 27 Jun 2026 07:35PM UTC 687
84.6
GitHub Action Run
Source Files on build 28298610954
  • Tree
  • List 687
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28298610954
  • c4c23b0c on github
  • Prev Build on main (#28295959931)
  • Next Build on main (#28315108916)
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