3939 Commits

Author SHA1 Message Date
Matt Borland 8ee12a5355 Merge pull request #1414 from su-senka/feature/chatterjee-mnn
Add M nearest-neighbour Chatterjee correlation (#990)
2026-07-02 15:06:46 -04:00
Matt Borland e06a6a657c Fix UB in sorting results with the cubic root finder 2026-07-01 09:41:49 -04:00
Oleksandr 2709fb2bac Add M nearest-neighbour Chatterjee correlation (#990) 2026-07-01 07:58:34 +02:00
Matt Borland bad351c738 Add patch from issue 2026-06-30 17:31:48 -04:00
jzmaddock 45fe9991ca Try and get gcov to register lines we know are hit. 2026-06-21 12:01:53 +01:00
jzmaddock ad99070a18 Comment out dead code, tweak testing for more coverage. 2026-06-19 19:12:08 +01:00
jzmaddock b1f70c8f98 pFq: prevent spurious overflow.
Make sure we throw the correct exceptions when the result is infinite.
Fixes #1404.
2026-06-11 17:53:02 +01:00
jzmaddock 9a964b4aa6 Merge pull request #1403 from dschmitz89/find_degrees_of_freedom_initial_guess
ENH: add warm start for root finder in `find_degrees_of_freedom`
2026-06-09 19:19:27 +01:00
a-leontyev fecc83bd81 Guard against intermediate x*x overflow in Student's t pdf/cdf (#1402)
* Guard against intermediate x*x overflow in Student's t pdf/cdf
* Return exact tail values instead of raising overflow_error (review feedback)

---------

Co-authored-by: LeantionX <leontyevanton1995@gmail.com>
Co-authored-by: Matt Borland <matt@mattborland.com>
2026-06-09 19:17:58 +01:00
jzmaddock 22da3792e5 students_t: Add exception handling guards.
The degree of freedom finders can call the quantile with arguments which result in an infinite result, as far as our root finders are concerned, any large value as a result will do, but we need to not allow an exception to escape or the root finder terminates.
2026-06-09 17:51:20 +01:00
John Maddock 594f210a7e Merge branch 'find_degrees_of_freedom_initial_guess' of https://github.com/dschmitz89/math into pr403 2026-06-09 13:25:03 +01:00
jzmaddock 13c0bc8963 Merge pull request #1368 from JacobHass8/nc-f-find-v1
Find degrees of freedom for `non_central_f` distribution
2026-06-09 13:17:47 +01:00
dschmitz89 ce299579d4 ENH: add initial guess for power equation inversion 2026-06-08 21:24:00 +02:00
dschmitz89 38ebc9a6cf ENH: add warm start for root finder 2026-06-08 21:16:39 +02:00
Jacob Hass a0bd79c0e2 Changed to non-central chi-squared dist 2026-06-02 13:18:04 -07:00
Jacob Hass bdce34ddf7 Added chi squared approximation 2026-06-02 10:05:01 -07:00
Jacob Hass 7a0975efc9 Fixed find_location negative scale 2026-05-28 13:53:18 -07:00
Jacob Hass 3aa42a3f82 Added extreme value distribution 2026-05-27 20:53:01 -07:00
Jacob Hass 5abd8a2a37 Added chi_squared distribution 2026-05-26 18:46:05 -07:00
Jacob Hass 2b07b7a3ec Added cauchy tests 2026-05-26 18:06:34 -07:00
Jacob Hass f2b43c29df Added nan handling for binomial distribution 2026-05-26 12:48:04 -07:00
Jacob Hass 96f7df8e25 Added som basic binomial tests 2026-05-26 11:43:58 -07:00
Jacob Hass ceb66f5c15 Merge branch 'boostorg:develop' into nc-f-find-v1 2026-05-25 15:41:49 -07:00
Jacob Hass 04eace43b1 Added checks for multiple degrees of freedom 2026-05-24 11:11:05 -07:00
jzmaddock 31197cace9 Fix edge case short circuit logic in binomial distro inverse.
Fixes: https://github.com/boostorg/math/issues/1397
2026-05-22 18:06:26 +01:00
Daniel Schmitz f724aec828 ENH: add parameter finder for degrees or freedom for students_t distribution (#1385)
* ENH: add parameter finder for degrees or freedom

* Add early exit if approximation is precise to machine precision

* Loosen tolerance and add tests in the tails

* Modularize and simplify

* Use overflow error instead of inf

* Relax all test tolerances

* Should use a linter ..

* Relax test tolerance for float precision and remove ill conditioned test with df=1e6

* Fix indentation

* Loosen tolerance for very high degrees of freedom

* Test if approximation is a good hint, otherwise fall back to 0.01

* Add test coverage of all cases for approximation

* Do not use symmetry for better numerical accuracy in the tails

* Add edge case tests

* Exclude float from testing for extreme values

* Update test comment

* Replace non ASCII character..

* Simplify using boost's own relative error function

* Add early exits for df=1 and df=inf

Co-authored-by: Copilot <copilot@github.com>

* Try to fix CI carnage

Co-authored-by: Copilot <copilot@github.com>

* Simplify analytical cases and raise overflow error for normal case

* Rename to find_degrees_of_freedom

---------

Co-authored-by: Copilot <copilot@github.com>
2026-05-22 17:49:30 +01:00
Charles Bicari 51efb17098 constants: Protect F which is defined as a macro by some frameworks - part 2
This is the sibling of : https://github.com/boostorg/math/pull/1391

The same issue occurs with unprotected macro. 
Had forgotten this one in previous correction.
2026-05-11 15:50:00 -04:00
jzmaddock f49ab98b02 InverseGaussian: Improve quantile behaviour. (#1395)
* InverseGaussian: Improve quantile behaviour.
Provide a better initial guess for the root, and bracket the root to avoid shooting off to infinity.
Fixes: https://github.com/boostorg/math/issues/1392
Refs: https://github.com/scipy/scipy/issues/25096
* InverseGaussian: Make bracket_root_towards_min/max non-recursive on CUDA.
2026-05-09 17:06:29 +01:00
Charles Bicari 03ba15aa42 constants: Protect F which is defined as a macro by some frameworks
For instance, ESP32 platform globally defines:

    esp32/WString.h: #define F(string_literal)  (FPSTR(PSTR(string_literal)))
2026-04-30 15:49:42 -04:00
Matt Borland 74406e5074 Simplify logic that we are asserting anyway 2026-04-28 16:02:01 -04:00
Matt Borland 2c4580c119 Allow fallthrough of Android to 128-bit float 2026-04-28 11:27:23 -04:00
Matt Borland 1d9e9279da Change macro definition 2026-03-30 10:45:00 -04:00
Matt Borland d6368ee45e Replace naked NVCC checks 2026-03-30 10:05:19 -04:00
Matt Borland f6ca42f320 Fix naked NVRTC macro check 2026-03-30 10:02:52 -04:00
Matt Borland c936a099fc User must explicitly enable CUDA support via CMake 2026-03-30 10:02:40 -04:00
Matt Borland fd70189643 Add user facing domain access 2026-03-17 12:06:47 -05:00
jzmaddock 9c00175c2f Merge pull request #1363 from JacobHass8/fix-ibeta-large-arguments
Fixes ibeta for large arguments
2026-03-17 16:44:44 +00:00
Jacob Hass 918bb51d81 Reverted changes to ibeta_fraction2_t to use int for m 2026-03-15 13:25:13 -07:00
jzmaddock c52fc0911b Merge pull request #1373 from JacobHass8/dist-maintenance
Manual type promotion for arcsine distribution
2026-03-15 19:40:49 +00:00
jzmaddock 372c10b46d Remove dead code and fix conceptual error. 2026-03-15 13:47:42 +00:00
jzmaddock c793e1cd1b Ellint2: Simplify fix. 2026-03-12 10:22:45 +00:00
jzmaddock 6f59f3852a Correct ellint_2 for N * PI / 2 phi argument.
Fixes https://github.com/boostorg/math/issues/1377.
2026-03-11 16:39:39 +00:00
Matt Borland 8fec9d93cd Fix scalar div for octonions 2026-03-09 08:36:02 -04:00
Jacob Hass d1eff51ed8 Removed debugging information 2026-03-08 14:33:38 -07:00
Jacob Hass 8e919f2380 Accepted review comments; testing code coverage 2026-03-07 10:47:32 -08:00
Jacob Hass 5e7591773a Fixed typo in complement quantile 2026-03-06 19:07:18 -08:00
Jacob Hass 89b393f229 [ci skip] Added missing bracket 2026-03-06 13:27:33 -08:00
Jacob Hass 423874d341 A couple of bug fixes 2026-03-06 10:49:02 -08:00
Jacob Hass 99b6d453a0 Added evaluation_t shorthand 2026-03-05 20:19:08 -08:00
Jacob Hass d0004eabbd Added typename to definitions and fixed undeclared result 2026-03-05 20:15:02 -08:00