Skip to content

Add the generalized extreme value distribution, and port test_negative_binomial to math_unit_test - #1573

Merged
NAThompson merged 1 commit into
developfrom
gev-and-negbin-port
Oct 13, 2026
Merged

NAThompson merged 1 commit into
developfrom
gev-and-negbin-port

Conversation

@NAThompson

@NAThompson NAThompson commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Location, scale and shape as on Wikipedia, with log1p/expm1 forms continuous through the Gumbel case and moments summed from the zeta series of lgamma where their Gamma combinations cancel. The negative binomial quantile checks now scale with the quantile's condition number, which reached 548 near zero and failed windows_gcc. The nanobind distributions get their parameters as properties and a repr that rebuilds them. SYCL tests build with -fp-model=precise, dropping three fast-math workarounds.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Requested by @WarrenWeckesser on #303. Accuracy against closed forms in 50 digits (orange: the error a half-ulp change in the argument causes):

ulps
moments
benchmark

2D: the error over the condition number's envelope, |ulps|/max(1/2, cond/2), against the closed forms in 50 digits; small xi is sampled down to 1e-12 on a log axis:

cdf
pdf, small negative xi
quantile

🤖 Generated with Claude Code

@NAThompson
NAThompson force-pushed the gev-and-negbin-port branch 5 times, most recently from 6fceaee to 7085ea8 Compare October 13, 2026 03:44
…e_binomial to math_unit_test

Location, scale and shape as on Wikipedia, with log1p/expm1 forms continuous through the Gumbel case and moments summed from the zeta series of lgamma where their Gamma combinations cancel. The negative binomial quantile checks now scale with the quantile's condition number, which reached 548 near zero and failed windows_gcc. The nanobind distributions get their parameters as properties and a repr that rebuilds them. SYCL tests build with -fp-model=precise, dropping three fast-math workarounds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NAThompson
NAThompson merged commit 6156cba into develop Oct 13, 2026
50 checks passed
@NAThompson
NAThompson deleted the gev-and-negbin-port branch October 13, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant