2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-28 19:32:08 +00:00
Commit Graph

2363 Commits

Author SHA1 Message Date
jzmaddock
eaf876c81e Correct non-central-t series convergence bug.
Fixes https://github.com/boostorg/math/issues/1035.
See also https://github.com/scipy/scipy/issues/19348.
Accuracy in left tail is still poor, and the reflection formula appears to be to blame as it's use causes the series to cancel out the first term, but it appears we have no real choice in the matter here.  At least we do now get a few digits correct.
2023-10-13 18:45:03 +01:00
jzmaddock
57b09f4919 More test cases and corrections. 2023-10-12 17:06:37 +01:00
jzmaddock
2dbd7698cc Adjust recursion when using the Bessel function approximation with large z.
Avoids hitting tgamma on a negative integer, also improves accuracy when b-a-0.5 is close to a negative integer.
Fixes https://github.com/boostorg/math/issues/1034.
2023-10-11 11:45:33 +01:00
jzmaddock
8ff6bc114e Avoid spurious overflow and divide by zero in ibeta.
Add tests extracted from SciPy bug report.
Fixes https://github.com/boostorg/math/issues/1006.
See also https://github.com/boostorg/math/pull/1009.
2023-09-01 15:48:43 +01:00
jzmaddock
0c4fc70036 Merge branch 'develop' into pr1007
Fixes Conflicts:
	test/test_binomial.cpp
2023-08-30 11:53:29 +01:00
jzmaddock
d967bf73d0 Improve accuracy in ibeta power terms usig Sterling's approximation (the non Lanczos case).
Completes work started here: https://github.com/boostorg/math/pull/1007
2023-08-30 11:50:28 +01:00
Jimmy Lu
74bb4bccf2 Fix inverse_discrete_quantile for large guess (#1007)
If `guess` passed to `inverse_discrete_quantile` cannot be represented
as floating point number, it is possible that `guess + 1` or `guess - 1`
does not change the value at all and we are stuck in infinite loop
inside `round_to_floor` or `round_to_ceil`.  Fix this by
increase/decrease more than 1 in these cases.

Example code to reproduce this:
```c++
boost::math::binomial_distribution<> dist(9079765771874083840, 0.561815);
boost::math::quantile(dist, 0.0365346);
```
2023-08-24 08:31:37 -04:00
ryanelandt
3d8e1d5362 test fix for multiprecision 562 (#1015) 2023-08-23 09:17:45 -04:00
Jimmy Lu
ee80892282 Fix inverse_discrete_quantile for large guess
If `guess` passed to `inverse_discrete_quantile` cannot be represented
as floating point number, it is possible that `guess + 1` or `guess - 1`
does not change the value at all and we are stuck in infinite loop
inside `round_to_floor` or `round_to_ceil`.  Fix this by
increase/decrease more than 1 in these cases.

Example code to reproduce this:
```c++
boost::math::binomial_distribution<> dist(9079765771874083840, 0.561815);
boost::math::quantile(dist, 0.0365346);
```
2023-08-05 12:53:30 -04:00
ryanelandt
c62682b1a6 Update kolmogorov quantile newton ub to 1 (#1002) 2023-07-31 10:19:42 -04:00
Matt Borland
8bb0d164f2 Merge pull request #978 from boostorg/cpp23-float
C++23 Floats
2023-06-28 08:02:25 +02:00
Rasmus Henningsson
0852c16a2a median_absolute_deviation bug fix for non-zero center (#997)
Fix bug causing median_absolute_deviation to return incorrect values
when a non-zero center (such as median which is the default) was used.
2023-06-19 09:18:15 +02:00
Nick
7887d43f83 Numerical evaluation of Fourier transform of Daubechies scaling funct… (#921)
* Numerical evaluation of Fourier transform of Daubechies scaling functions.

* Update example/calculate_fourier_transform_daubechies_constants.cpp

Co-authored-by: Matt Borland <matt@mattborland.com>

* Update example/fourier_transform_daubechies_ulp_plot.cpp

Co-authored-by: Matt Borland <matt@mattborland.com>

* Update include/boost/math/special_functions/fourier_transform_daubechies_scaling.hpp

Co-authored-by: Matt Borland <matt@mattborland.com>

* Update include/boost/math/special_functions/fourier_transform_daubechies_scaling.hpp

Co-authored-by: Matt Borland <matt@mattborland.com>

* Rename include file to reflect it implements both the scaling and wavelet.

* Add performance to docs.

* Update test/math_unit_test.hpp

Co-authored-by: Matt Borland <matt@mattborland.com>

* Add boost-no-inspect to files with non-ASCII characters.

---------

Co-authored-by: Matt Borland <matt@mattborland.com>
2023-06-13 08:05:00 -07:00
Matt Borland
ff1a265e45 Add to test_constants 2023-05-31 17:06:05 +02:00
Matt Borland
a7f98dbe00 Add casts to all two argument cmath functions to work around GCC bug
[ci skip]
2023-05-31 15:43:54 +02:00
Matt Borland
b66264fa90 Collected special functions warning fixes
[ci skip]
2023-05-31 14:34:10 +02:00
Matt Borland
7a66a98f88 Fix for autodiff 3 2023-05-31 09:32:56 +02:00
Matt Borland
6d37555ccc Collected autodiff fixes 2023-05-30 17:25:48 +02:00
Matt Borland
823fcd4cf2 Add test and cast to finite differences 2023-05-30 16:46:23 +02:00
Matt Borland
29fbc5b059 Add tests for issue 18511 2023-05-23 12:38:39 +02:00
Matt Borland
54b172236d Fix stack overflow 2023-05-23 12:00:49 +02:00
Matt Borland
f968bec20f Replace 32 bit unsigned with 64 bits 2023-05-23 10:52:50 +02:00
Matt Borland
d1bd7b6f80 Add casting and tests 2023-05-22 14:50:12 +02:00
Matt Borland
ebcc43091f Add casting to whittaker shannon for conversion rank errors 2023-05-22 13:52:25 +02:00
Matt Borland
faaf4759ac Fix stack overflow in cohen acceleration from GCC bug 2023-05-22 13:48:33 +02:00
Matt Borland
ca31dcfe93 Add AGM test 2023-05-22 13:43:32 +02:00
Matt Borland
aef57135b3 Add rsqrt test and update type traits for control path 2023-05-22 13:08:10 +02:00
Matt Borland
c4c8c6936a Add wavelet transform test with additional casts 2023-05-22 12:59:18 +02:00
Matt Borland
f86ea8e88c Begin adding interpolator tests 2023-05-17 18:48:47 +02:00
Matt Borland
00facdc1a9 Fix cardinal cubic b spline for std::float32_t 2023-05-17 18:10:49 +02:00
Matt Borland
61043631b6 Add float128 testing 2023-05-16 15:02:09 +02:00
Matt Borland
d217813b03 Fix stack overflow on test_finite_singular_boundary with _Float64 2023-05-16 11:49:30 +02:00
jzmaddock
c5b4d28e05 Suppress lots of warnings for std::float32_t.
Better configure promote_args test case.
2023-05-15 17:08:41 +01:00
jzmaddock
58264c02e1 Add test case for promote_args. 2023-05-14 18:40:01 +01:00
jzmaddock
ac4605b12d Fix Minw-64 C++23 compile failures. 2023-05-13 19:13:11 +01:00
Matt Borland
6a3a89bfd1 Add testing to quadrature 2023-05-11 14:36:24 +02:00
jzmaddock
d5960de3db Fix case where b is a negative integer and z is also negative. (#983)
* Fix case where b is a negative integer and z is also negative.
Add tests etc.
Fixes: https://github.com/boostorg/math/issues/982.
2023-05-04 09:17:16 +01:00
Matt Borland
bc79263bd0 Add compile tests for F32 and F64 2023-05-02 13:11:49 +02:00
Matt Borland
2f0b0ed366 Add more testing 2023-04-25 13:35:29 +02:00
Matt Borland
5dcf5a9fdb Test beta dist for F64, F32, and F16 2023-04-24 14:53:05 +02:00
Matt Borland
298a243ccd Fix for scipy issue 18302 (#977) 2023-04-21 12:31:23 +02:00
Matt Borland
93448acea7 Merge pull request #946 from mborland/logcdf
Add logcdf to distributions
2023-04-13 14:10:35 +02:00
Matt Borland
e5b4f3f0c3 Improve trunc handling 2023-04-03 14:50:22 +02:00
Matt Borland
dc676d54f9 Fix extra characters 2023-04-03 14:25:08 +02:00
Matt Borland
1de39c69ef Add coverage for lround and iround 2023-04-03 14:06:29 +02:00
Matt Borland
8dfc73533d Fix __float128 test macros 2023-04-03 13:54:06 +02:00
Matt Borland
b67bfb749f Remove long double testing 2023-03-22 12:00:48 -07:00
Matt Borland
3200ce108d Change comparison to max 2023-03-21 08:11:00 -07:00
Matt Borland
6989ad19ff Don't use constexpr calculation with concept tests 2023-03-20 17:50:04 -07:00
Matt Borland
c901be5ca2 Fix __float128 2023-03-20 17:49:27 -07:00