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

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

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 14 Aug 2026 12:27PM UTC
Jobs 1
Files 616
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

14 Aug 2026 11:50AM UTC coverage: 85.361% (+0.002%) from 85.359%
31797849430

push

github

web-flow
feat(takum): add exact cross-conversion between the linear and logarithmic takum (#1309)

The two variants share an encoding but not a value map, so converting between
them is arithmetic, not reinterpretation.  Equating the maps gives

    l * log2(sqrt(e)) = E + log2(1 + f)

which is transcendental in both directions and exact in neither: log2(sqrt(e))
is irrational, so no non-trivial encoding maps onto another exactly.  Only the
accuracy of the rounding is in question.

A double is not accurate enough.  Measured against a 113-bit __float128
reference, the obvious route -- takum<n,3>{ double(takum_log<n,3>) } -- is
correctly rounded through 48 bits and then collapses, because takum<64,3>
reaches p = 59 and a double carries 53:

                      naive double     this implementation
    log64 -> lin64    99.14% wrong     correctly rounded
    lin64 -> log64    99.09% wrong     correctly rounded
    log48 -> lin48     0.03% wrong     correctly rounded
    lin48 -> log48     0.09% wrong     correctly rounded

The work is done in dd_cascade, whose ~106 bits leave thirteen orders of margin:
its exp2 is accurate to 1.0e-32 and its log1p to 7.6e-31 against the same
reference, where 2^-60 is 8.7e-19.

Three details carry the result:

  exact_value()          reconstructs c + M/2^p exactly, splitting M into halves
                         that each fit a double, since M reaches 2^59

  to_integer_fraction()  extracts the answer ROUNDED TO ODD.  Rounding to
                         nearest at 2^-62 and letting encode_fraction() round
                         again to p bits rounds twice, and the two disagree near
                         a tie: that alone left 1.8% of 64-bit conversions off by
                         an ulp, the only error that survived moving to
                         dd_cascade.  Round-to-odd makes the second rounding
                         agree with rounding the exact value directly.

  the target's metric    both targets round on... (continued)

58 of 58 new or added lines in 1 file covered. (100.0%)

9 existing lines in 2 files now uncovered.

42182 of 49416 relevant lines covered (85.36%)

7262907.08 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
93.73
-0.47% include/sw/universal/number/cfloat/cfloat_impl.hpp
1
87.41
-0.62% include/sw/universal/number/takum/takum_codec.hpp
Jobs
ID Job ID Ran Files Coverage
1 31797849430.1 14 Aug 2026 12:27PM UTC 616
85.36
GitHub Action Run
Source Files on build 31797849430
  • Tree
  • List 616
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #31797849430
  • 03b130fe on github
  • Prev Build on main (#31767675386)
  • Next Build on main (#31816715669)
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