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

stillwater-sc / universal / 42166969421
89%
master: 84%

Build:
Build:
LAST BUILD BRANCH: fix/fixpnt-quire-resolve-saturates
DEFAULT BRANCH: master
Ran 06 Nov 2026 05:31AM UTC
Jobs 1
Files 855
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

06 Nov 2026 05:11AM UTC coverage: 88.598% (-0.007%) from 88.605%
42166969421

push

github

web-flow
feat(numeric): exact floor, ceil, trunc, round and fmod for faithful (#1958)

Part 1 of #1952. These are exact functions of the two parts. Rounding
to the FloatingPointType first would be wrong, not just imprecise.
Above 2^digits(Real) the value part is an integer and the fraction sits
in the error part, as for dd before #1667.

- floor: for a canonical pair (v, e), a v that is not an integer
  decides alone. Its fraction is a multiple of ulp(v), at least 2|e|.
  When v is an integer, the result is v + floor(e), added exactly with
  twoSum. ceil and trunc follow, and round adds 0.5 and 1 to the floor,
  which is exact for any pair that has a fraction. Signed zeros follow
  <cmath>.
- fmod: the exact remainder x - n y, reduced in an exact expansion of
  Real components (Shewchuk's GROW-EXPANSION). Each step subtracts
  q * (|y| 2^k), with q an integer biased just below the quotient so the
  remainder never goes negative. The quotient can be far beyond Real's
  range, 2^230 for float in fmod(max / 4, 2^-105), so above 2^digits the
  divisor is scaled up by 2^k instead of q, which is exact. The result is
  rounded once to a pair and takes x's sign. The special cases follow
  std::fmod, with EDOM. fractional.hpp includes truncate.hpp for
  canonical, so it compiles on its own.

numeric/faithful/truncation.cpp checks every function against an exact
reference: the double sum for faithful<float> and qd for
faithful<double>. The cases include integers above 2^digits with a
fraction in the error part, halfway cases in the error part, divisors
whose error part matters, quotients beyond Real's range, and signed
zeros. The test also checks that its generator reaches cases where floor
through Real is wrong. Evaluating floor or fmod through Real fails about
175000 and 20000 of the checks.

Resolves #1954
Relates to #1952

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

212 of 241 new or added lines in 3 files covered. (87.97%)

3 existing lines in 2 files now uncovered.

58102 of 65579 relevant lines covered (88.6%)

8823102.42 hits per line

Uncovered Changes

Lines Coverage ∆ File
29
81.29
numeric/faithful/truncation.cpp

Coverage Regressions

Lines Coverage ∆ File
2
84.93
-0.3% include/sw/universal/number/qd/qd_impl.hpp
1
93.16
-0.85% include/sw/universal/verification/correctly_rounded_reference.hpp
Jobs
ID Job ID Ran Files Coverage
1 42166969421.1 06 Nov 2026 05:31AM UTC 855
88.6
GitHub Action Run
Source Files on build 42166969421
  • Tree
  • List 855
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42166969421
  • aa6e3569 on github
  • Prev Build on main (#42161765292)
  • Next Build on main (#42174431513)
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