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

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

Build:
Build:
LAST BUILD BRANCH: fasttakum
DEFAULT BRANCH: master
Ran 13 Sep 2026 08:41PM UTC
Jobs 1
Files 667
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

13 Sep 2026 08:10PM UTC coverage: 85.67% (-0.02%) from 85.692%
34779940206

push

github

web-flow
fix(blockdecimal): store a two-digit DPD remainder as one 7-bit group (#1483)

DPD packs digits in 10-bit declets of three, with the one or two leftover digits at
the top. dpd_bits() reserves 4 bits for one leftover digit and 7 for two, but
blockdecimal stored two as a pair of 4-bit nibbles, 8 bits. Whenever
ndigits % 3 == 2 the high bit of the leading digit fell outside the storage, so a
leading 8 or 9 read back as 0 or 1: blockdecimal<8,DPD>(80000000) was 0,
dfixpnt<8,3,DPD>(82345.678) was 2345.678, and dfixpnt<8,3,DPD>::maxpos() was
19999.999 (#1477). On main, 40 of the 199 values of blockdecimal<2,DPD> and 40,000
of blockdecimal<5,DPD> fail to round-trip.

The two digits are now one DPD group: the declet of 0XY, whose upper three bits are
always zero, so it fits the 7 reserved bits. New dpd_encode_2digits() and
dpd_decode_2digits() in dfloat/dpd_codec.hpp do this; #1482 (dfloat drops the same
leftover digits entirely) can reuse them. The decoder reduces mod 100, so the 28
7-bit patterns the encoder never produces still give a two-digit value. For pairs
whose digits are both 7 or less, the group has the same bits as the old nibble
layout (all 64 such pairs checked), so only pairs containing an 8 or 9 get a new
bit pattern.

Tests:
- internal/blockdecimal/conversion/dpd.cpp (bd_dpd): the two-digit helpers for all
  100 values and all 128 patterns. Exhaustive round trips at 1, 2, 4 and 5 digits
  (6 to 8 at higher levels). Random digit strings written through setdigit in random
  order against BCD, plus maxval(), at every width from 1 to 12 and at 13 to 35
  digits at level 2.
- static/fixpnt/decimal/arithmetic/encodings.cpp: brings back the N % 3 == 2 widths
  (dfixpnt<8,4> Modulo and Saturate, dfixpnt<5,2>), which #1474's test had to skip,
  and checks that maxpos, maxneg and minpos agree across BCD, DPD and BID at every
  width from 1 to 12.

Both fail without this change (the limits check at exactly maxpos and maxneg for
widths 2, 5, 8 and 11) an... (continued)

76 of 94 new or added lines in 3 files covered. (80.85%)

8 existing lines in 1 file now uncovered.

43551 of 50836 relevant lines covered (85.67%)

7393013.74 hits per line

Uncovered Changes

Lines Coverage ∆ File
18
75.0
internal/blockdecimal/conversion/dpd.cpp

Coverage Regressions

Lines Coverage ∆ File
8
93.06
-0.52% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 34779940206.1 13 Sep 2026 08:41PM UTC 667
85.67
GitHub Action Run
Source Files on build 34779940206
  • Tree
  • List 667
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34779940206
  • da72bc85 on github
  • Prev Build on main (#34775761975)
  • Next Build on main (#34780406903)
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