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

stillwater-sc / universal / 34995207204
86%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 15 Sep 2026 04:50PM UTC
Jobs 1
Files 670
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

15 Sep 2026 04:28PM UTC coverage: 85.863% (-0.04%) from 85.903%
34995207204

push

github

web-flow
fix(areal): convert to long double with ldexp in the target type (#1512)

Converting an areal to long double gave wrong values (#1509). On clang,
long double(areal<32,8>(0.75)) was -nan and 1.0/3 came back as twice the value.
On every compiler a value outside double's exponent range came back as inf or 0,
and so did every subnormal of a configuration with es >= 12.

to_native() built the power of two three ways, each with its own defect:

- inside (-64, 64) from 1ull << e. clang 18 miscompiles
  1 / (long double)(1ull << n) for a runtime n, at -O0 and -O2 alike. A signed
  shift and a plain uint64_t argument both convert correctly. It is the fault
  #937 worked around in cfloat.
- outside that range as a double from ipow(), which caps a long double at
  double's range. ipow also computed 2^-e as 1 / 2^e, so for e <= -1024 it
  divided by inf and flushed double subnormals to 0 as well.
- for subnormals from subnormal_exponent[es], a table of doubles that holds 0
  for es >= 12.

All three are now std::ldexp in TargetFloat, and the ipow() helper is gone.

static/range/areal/conversion/native_conversion.cpp checks against a reference
that decodes an encoding's fields with integer arithmetic and std::ldexp,
without any areal conversion. It checks every encoding of the small
configurations. For areal<32,8>, <64,11>, <64,12> and <64,15> it checks every
exponent field, with limbs straddled, against float, double and long double
wherever the target holds the significand exactly. It also round-trips
long double -> areal<128,15> -> long double. denorm_min is included only where
the areal holds it: a quad long double's 2^-16494 is one binade below
areal<128,15>'s minpos. Against the old header it fails on gcc and on clang.
Verified on x86 with gcc and clang, and under qemu-riscv64 and qemu-aarch64
(113-bit long double).

BEHAVIOUR-CHANGE: long double(areal) is now correct on clang (was nan or scaled by a power of two) and holds values outside double's range; dou... (continued)

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

18 existing lines in 2 files now uncovered.

44047 of 51299 relevant lines covered (85.86%)

8259139.9 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
31.43
-3.57% include/sw/universal/verification/test_suite_randoms.hpp
8
93.06
-0.52% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 34995207204.1 15 Sep 2026 04:50PM UTC 670
85.86
GitHub Action Run
Source Files on build 34995207204
  • Tree
  • List 670
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34995207204
  • ccad68e2 on github
  • Prev Build on main (#34923927380)
  • Next Build on main (#35007501354)
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