2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-30 08:02:11 +00:00
Commit Graph

2277 Commits

Author SHA1 Message Date
jzmaddock
79bf64e23f Merge pull request #949 from mborland/15101
Fix for scipy issue 15101
2023-02-13 15:36: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
a26b1045de Fix expected value's type for MSVC 2023-02-11 09:56:08 -08:00
Matt Borland
1e47518075 Fix for scipy issue 15101 2023-02-11 09:16:32 -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
Matt Borland
38f9a5e62c Add /bigobj for MSVC failures 2023-01-31 08:23:00 -08:00
Matt Borland
c5a4755903 Downgrade condition numbers language requirement to C++14 2023-01-30 11:00:11 -08:00
Matt Borland
f0933b401c Ignore warnings in distribution tests suite (#933) 2023-01-30 10:37:33 -08:00
jzmaddock
09e1350f6f Update tanh_sinh handling of boundaries. (#894)
* Update tanh_sinh handling of boundaries.
So that we don't accidentality end up at an end point, even when arithmetic is inexact, and the FP type has no denomrms.
Fixes: https://github.com/boostorg/math/issues/893

* Add licence/copyright to new file.

* Remove tabs.
2023-01-15 12:40:34 +00:00
jzmaddock
fae96bf542 S390x testing: make all the tests 128-bit float safe.
* Remove tests we don't need right now.
!!!REVERT THIS COMMIT BEFORE MERGING!!!

* Add s390x testing to drone.

* Correct drone file.

* Correct drone file (again)

* Prevent complete cancellation in bessel_jy logic.

* Correct testing for 128-bit floats.

* Make some more tests 128-bit long double safe.

* Make more tests 128-bit float safe.

* Fix some more 128-bit testing issues.

* More 128-bit float fixes.

* Make more tests 128-bit float safe.

* Fix up remaining tests for 128-bit floats.

* Yet more 128-bit float test case fixes.

* Fix up more tests for 128-bit floats and non-intel platforms.

* Fix up more tests to be 128-bit long double safe.

* More test case adjustments.

* More 128-bit float error rate adjustments.

* Fixes for autodiff tests

* Two more test fixes.

* Fix up daubechies_scaling_test.cpp and reinstate full CI.

Co-authored-by: Matt Borland <matt@mattborland.com>
2023-01-11 18:31:05 +00:00
Matt Borland
11443ceefa Fix -inf handling for sqrt 2023-01-07 09:50:15 -08:00
Matt Borland
773f7741c4 Require C++14 support 2022-12-27 14:24:41 +01:00
jzmaddock
6ab71df84a Fix tanh_sinh warnings.
Introduced in previous fix.
2022-12-15 17:48:50 +00:00
jzmaddock
0b56a468a9 Make integrators const correct.
Update tests accordingly.
2022-12-15 17:38:36 +00:00
jzmaddock
c55e6856b6 Fix tanh_sinh integration for edge case,
where max_left_index/max_right_index may go to zero if the function being integrated overflows the FP type being used across nearly all of it's range.  Fixes https://github.com/boostorg/math/issues/898
2022-12-11 13:11:08 +00:00
Rose
dbb1ae7667 Use cfloat instead of float.h
It would be more consistent to use the C++ headers instead of the C ones.
2022-12-09 11:07:42 -05:00
Matt Borland
5c1392176c Fix FE_INVALID in quantile 2022-12-04 12:52:52 -08:00
Matt Borland
0ec83bcb3a Fix FE_INVALID in non-central t CDF
[ci skip]
2022-12-04 12:29:17 -08:00
Matt Borland
fc88a11289 Fix for binomial distribution quantile edge case 2022-12-03 09:49:29 -08:00
jzmaddock
e245e48fea Correct tests to make them Multiprecision safe. 2022-12-02 17:47:10 +00:00
jzmaddock
20fc2addea More and better handling of ibeta small args. 2022-11-27 19:14:14 +00:00
jzmaddock
c6fccc286e Correct concept failures. 2022-11-25 19:51:00 +00:00
jzmaddock
8add2b4373 Correct handling of NaN's and infinities in ibeta.
Update tests.
Fixes https://github.com/boostorg/math/issues/878
2022-11-25 17:08:58 +00:00
jzmaddock
2cdabeb30e Merge pull request #875 from boostorg/issue873
Correct root finders in extreme cases.
2022-11-15 09:00:39 +00:00
Brian Wignall
1923ba5c75 Fix typos (#876) 2022-11-12 17:16:53 -08:00
jzmaddock
fbb4398683 Correct root finders in extreme cases.
Fixes: https://github.com/boostorg/math/issues/873
2022-11-11 19:36:24 +00:00
jzmaddock
4631716f66 s/constructable/constructible/
[CI SKIP]
2022-11-10 18:49:37 +00:00
Rose
fe48a3bba7 Junk removal
Removal of junk headers, typos, or mistakenly duplicated keywords
2022-11-05 12:14:12 -04:00
Matt Borland
53534c5505 Fix for scipy issue 17146 (#847)
See: https://github.com/scipy/scipy/issues/17146
2022-10-17 17:54:46 -07:00
Matt Borland
dfdb50caca Fix for issue 845 (#846)
* Fix for issue 845

Avoid division by zero in special cases
2022-10-17 13:52:56 -07:00
Nicholas McKibben
7ad016f34b short-circuit overflow protection for M1 Mac clang (#827)
xref scipy/scipy#14901

Splits single if statement into two to avoid apparent clang short-circuit bug on M1 Mac platforms.

Co-authored-by: Matt Borland <matt@mattborland.com>
2022-10-12 15:03:13 -07:00
Nick
aac1131351 Specify seed in random tests. (#839) 2022-10-09 12:42:41 -07:00
Nick
ea9c3a27e9 Fix quartic roots when depressed cubic only has single real root (#838) 2022-10-08 21:39:08 -07:00
jzmaddock
9346271a45 Fix Issue 833 (#835)
* Correct 1F1[-n, -n, x]
To match what Mathematica does.
Fixes: https://github.com/boostorg/math/issues/829

* Pass policy in forwarding call to gamma_q.

* Fix bug in 1F1 recurrence relations when one term goes to zero.
Fixes issue with 1F1[-n, n, n].
Also reduce cancellation error in a = -1 special case.
Fixes https://github.com/boostorg/math/issues/833.
2022-10-07 09:35:26 +01:00
jzmaddock
92775b53fc Correct 1F1[-n, -n, x] (#832)
* Correct 1F1[-n, -n, x]
To match what Mathematica does.
Fixes: https://github.com/boostorg/math/issues/829
2022-10-06 11:10:56 +01:00
Antony Polukhin
a3c2c0d0b2 Modernize exception specification (#822)
Replace `throw()` with `BOOST_NOEXCEPT_OR_NOTHROW`
2022-09-27 11:07:58 -07:00
Matt Borland
48edf590f4 Fix include logic for <bit> and assert 0 and NAN when no bit_cast 2022-08-26 09:27:23 -07:00
Matt Borland
3a69eaf7da Add NAN and Zero support for long doubles 2022-08-26 09:27:23 -07:00
Matt Borland
a0d3b809b0 Add NAN and Zero support for doubles 2022-08-26 09:27:23 -07:00
Matt Borland
d62f0d9ba0 Add NAN and Zero support for float 2022-08-26 09:27:23 -07:00
Matt Borland
53e6658208 Fix for issue #800 2022-08-04 20:17:15 -07:00
jzmaddock
45e479deb0 Add #include tests for hypergeometric functions.
Fix the one error detected.
2022-08-04 13:37:20 +01:00
Matt Borland
fae5c5cd12 Add missing headers and test for git issue 2022-08-03 19:28:35 -07:00
Samuel Rowlinson
9adf7ea4bc Added test for circ conic section cubic b spline
This tests the fix for the right endpoint derivative bug in `cardinal_cubic_b_spline`.
2022-07-10 15:59:26 +01:00
Matt Borland
0569685944 Remove unused paratemers in test_nc_t 2022-07-02 19:47:26 -07:00
Matt Borland
3373357752 Remove unused parameter from catmull_rom 2022-07-02 19:39:45 -07:00
Matt Borland
d2c3694ebc Suppress quaternion constexpr test unused variable 2022-07-02 19:28:05 -07:00
Matt Borland
0b57cd2cd7 Suppress TR1 unused variable warnings 2022-07-02 19:23:55 -07:00
Matt Borland
c94cf596eb Suppress unused variable warning 2022-07-02 19:16:25 -07:00