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

petbox-dev / dca / 31029069563
99%

Build:
DEFAULT BRANCH: main
Ran 05 Aug 2026 05:15PM UTC
Jobs 1
Files 5
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

05 Aug 2026 05:12PM UTC coverage: 99.459% (+0.1%) from 99.346%
31029069563

push

github

dsfulf
test: stop asserting bit-exact floats against captured literals

The CI failure was `np.array_equal` on `MH(1000,.8,1.5,0).cum(t)` against
literals captured on Windows. The two arrays print identically; they differ
by exactly one ULP. `cum` reaches those values through expm1, whose last bit
differs between MSVC and glibc.

Reproduced on real glibc through WSL rather than reasoning about it, and
measured the gap: 1 ULP on every `cum` pin for all three models, max
relative difference 2e-16. rtol=1e-15 is about five ULP -- covers any libm,
still fails on a real change in the arithmetic.

The docstring claimed these were "exact equalities, not approximations: the
arithmetic is untouched, only the branch predicate changed". The reasoning
was right and the assertion was the wrong expression of it: what is exactly
true is that every D and b these models STORE is non-negative, so the abs()
predicate and the bare predicate see identical values. That holds
bit-for-bit on any platform and needs no captured numbers. It is now
asserted directly, with the literals kept only as a loose regression pin.

Running the full suite on Linux then surfaced a second failure CI had not
yet reported: test_time_at_rate_inverts_rate asserted
`rate(time_at_rate(q)) == q` exactly. Four of the five models do round-trip
bit-exactly on glibc; GeneralizedHyperbolic is one ULP out, because
inverting across a segment boundary carries an extra rounding. Now
rtol=1e-15 -- still six orders of magnitude tighter than the rtol=1e-9 the
same test uses for the recovered *time*, and the gap between the two is
documented, because it is the point: the time is approximate, the rate you
get back is not.

Verified on five platform/version combinations, lint and tests:
linux/glibc py3.12 numpy 2.5, and windows py3.10 numpy 2.2 / py3.11 numpy
2.4 / py3.12 numpy 2.5 / py3.13 numpy 2.5. 144 tests everywhere.

CLAUDE.md gains the general rule, since this is the third instance: never
assert exact float equa... (continued)

1104 of 1110 relevant lines covered (99.46%)

0.99 hits per line

Coverage Regressions

Lines Coverage ∆ File
4
99.4
0.09% petbox/dca/primary.py
1
99.52
0.05% petbox/dca/base.py
1
97.78
0.0% petbox/dca/bourdet.py
Jobs
ID Job ID Ran Files Coverage
1 31029069563.1 05 Aug 2026 05:15PM UTC 5
99.46
GitHub Action Run
Source Files on build 31029069563
  • Tree
  • List 5
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #31029069563
  • 372ae1b3 on github
  • Prev Build on main (#29046065027)
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