2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-22 03:22:28 +00:00
Commit Graph

3092 Commits

Author SHA1 Message Date
Matt Borland
94c68f82f0 Change types in hypergeometric cdf and pdf impls 2023-05-24 09:40:22 +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
Nick
b998b1c292 Minor PCHIP cleanup (#984)
The comment that the finite difference approximation to the derivative
was the only way to produce monotonicity was wrong.

In addition, the error message gave no hint as to its origin. Fix this.
2023-05-08 12:34:38 +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
298a243ccd Fix for scipy issue 18302 (#977) 2023-04-21 12:31:23 +02:00
Madiyar
109a814e89 Fix fisher_f mode (#976)
* Fix fisher_f mode 

The mode for F-distribution is defined when `df1 > 2` according to https://en.wikipedia.org/wiki/F-distribution. It is also reasonable since `df2 * (df1 - 2) / (df1 * (df2 + 2))` becomes zero or negative when `df1 <= 2`

Co-authored-by: Matt Borland <matt@mattborland.com>
2023-04-14 12:30:53 +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
3a81f17b14 Replace language version check with feature check 2023-04-05 14:15:59 +02:00
Matt Borland
2c141fe268 Disable __float128 2023-04-03 17:43:50 +02:00
Matt Borland
03f4498b16 Change handling for non-literal types 2023-04-03 17:04:06 +02:00
Matt Borland
93b31d1e19 Use boost::math fpclassify functions 2023-04-03 15:40:28 +02:00
Matt Borland
c597cb1112 Fix ccmath fpclassify for poison 2023-04-03 15:03:11 +02:00
Matt Borland
e5b4f3f0c3 Improve trunc handling 2023-04-03 14:50:22 +02:00
Matt Borland
1de39c69ef Add coverage for lround and iround 2023-04-03 14:06:29 +02: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
b1a95fa2c1 Add BOOST_PREVENT_MACRO_SUBSTITUTION 2023-03-20 17:03:47 -07:00
Matt Borland
5a50ec7868 Simplify and constexperize 2023-03-20 15:22:44 -07:00
Matt Borland
5284fb7fa8 Explicitly cast the result 2023-03-16 21:49:43 -07:00
Matt Borland
b8fb413405 Compensate for signedness 2023-03-16 21:23:52 -07:00
Matt Borland
f349ddbb5a Fix for long doubles 2023-03-16 20:11:05 -07:00
Matt Borland
73b8ffc13c Fix llround for non-representable numbers 2023-03-16 19:26:23 -07:00
Matt Borland
1f94d9806b Fix -Wmaybe-uninitialized in bessel jy series 2023-03-10 12:31:51 -08:00
jzmaddock
cf6cd75477 Improve error handling in non-central distributions. (#963)
* Improve error handling in non-central distributions.

* Try turning debug symbols off for msvc-14.0.
So we don't run out of disk space on CI.
2023-03-07 12:11:29 +00:00
jzmaddock
bf3bc2e6c2 Fix ibeta_inv for very small p. (#962)
* Fix ibeta_inv for very small p.
Change assert's in temme_method_1_ibeta_inverse to corrections when guess goes out of range.
Change handling of non-convergence in second_order_root_finder to use bracketing when the end points are many orders of magnitude apart.
Fixes: https://github.com/boostorg/math/issues/961.

* Add missing copyright.
[CI SKIP]
2023-03-05 13:18:27 +00:00
Matt Borland
8b52854cb5 Use control points to determine amount of scratch space needed 2023-03-02 09:47:23 -08:00
Matt Borland
91e98b89e3 Replace int with long long in nct pdf and cdf 2023-02-21 08:16:31 -08:00
Matt Borland
3886633231 Add complement logcdf for laplace distribution 2023-02-14 09:39:28 -08:00
Matt Borland
fcf05006cb Add complement logcdf for extreme value distribution 2023-02-14 08:43:47 -08:00
jzmaddock
79bf64e23f Merge pull request #949 from mborland/15101
Fix for scipy issue 15101
2023-02-13 15:36:56 +00:00
jzmaddock
879e26013a Disable legendre_stieltjes.hpp inclusion when exceptions are off. 2023-02-12 18:37:43 +00:00
jzmaddock
d7b68a7fb5 Fix gigenbauer for non-eh environments. 2023-02-12 15:27:56 +00:00
jzmaddock
bf4c7fdd2c Fix hypergeometric for use with -fno-exceptions.
Add test case.
Refs: https://github.com/boostorg/math/pull/947
2023-02-12 12:18:42 +00:00
Matt Borland
7b678a9001 Add logcdf specialization to rayleigh distribution 2023-02-11 18:07:27 -08:00
Matt Borland
614445505a Add logcdf specialization to pareto distribution 2023-02-11 17:49:29 -08:00
Matt Borland
e387f9c429 Add logcdf specialization to geometric distribution 2023-02-11 17:28:27 -08:00
Matt Borland
a77f0fa196 Add logcdf specialization to exponential distribution 2023-02-11 16:42:20 -08:00
Matt Borland
1e47518075 Fix for scipy issue 15101 2023-02-11 09:16:32 -08:00
Matt Borland
6159c05a2b Improve laplace logcdf 2023-02-07 10:13:22 -08:00
Matt Borland
c0f89544c3 Add logistic distribution logcdf for complement two type 2023-02-06 18:14:49 -08:00
Matt Borland
b02674d50f Improve logistic distribution logcdf 2023-02-06 18:02:59 -08:00
Matt Borland
f7a4adc0cc Add logcdf specialization to weibull distribution 2023-02-06 11:24:09 -08:00
Matt Borland
58006b2250 Add generic logcdf for complemented two type 2023-02-06 11:12:51 -08:00
Matt Borland
c73c96ce95 Add logcdf specialization to logistic distribution 2023-02-06 10:40:53 -08:00
Matt Borland
04501b8b2f Add logcdf specialization for laplace distribution 2023-02-05 20:04:50 -08:00
Matt Borland
29d8fb19c3 Add logcdf specialization to extreme value distribution 2023-02-05 17:31:21 -08:00
Matt Borland
f4781481d2 Add generic logcdf 2023-02-05 14:31:51 -08:00
Nick
4aac532a88 Add Estrin's method for polynomial evaluation (#932)
* Add Estrin's method for polynomial evaluation

N.B.: This is a slightly modified version of the code provided by Thomas Dybdahl Ahle in a github issue.

[CI SKIP] [ci skip]

* Add comparisons to Horner with std::array.
[CI SKIP]

* Add Estrin's method for polynomial evaluation

N.B.: This is a slightly modified version of the code provided by Thomas Dybdahl Ahle in a github issue.

[CI SKIP] [ci skip]

* Fix hang in n=0 case.

* Fix out of bounds access in test.

* Fix endsect for estrin.qbk.

* Apply clang-format to make the 'inspect' stage happy.

* Add type_traits header to includes.

* Add ulp plot.

* Document decreased accuracy of Estrin's method.

* Add assertion for size of scratch pad

* Remove std::size since it is C++17

* Add C++14 testing

* estrin -> evaluate_polynomial_estrin.

---------

Co-authored-by: jzmaddock <john@johnmaddock.co.uk>
Co-authored-by: Matt Borland <matt@mattborland.com>
2023-02-04 10:32:06 -08:00
Matt Borland
fb85bdb510 Fix for scipy issue 17916 (#939) 2023-02-03 09:10:47 -08:00