2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-29 07:42:11 +00:00
Commit Graph

3049 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
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
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
c5a4755903 Downgrade condition numbers language requirement to C++14 2023-01-30 11:00:11 -08:00
jzmaddock
c560d8681e Fix for Scipy Issue 16079.
Big slowdown in evaluation of constexpr tables.
Fixes: https://github.com/boostorg/math/issues/923
2023-01-27 20:26:14 +00:00
Matt Borland
e2c989cd18 Add M1 testing to drone (#868) 2023-01-16 11:13:04 -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
Matt Borland
80ff4aa612 Add deprecation notice to complex functions 2023-01-11 10:54:33 -08: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
8c26796f71 Fix inf handling and simplify type promotion 2023-01-08 15:00:44 -08:00
Matt Borland
44a7828834 Fix logb inf handling 2023-01-07 10:07:54 -08:00
Matt Borland
11443ceefa Fix -inf handling for sqrt 2023-01-07 09:50:15 -08:00
Matt Borland
ec499a43b7 Simplify fdim type promotion logic 2023-01-03 17:13:16 +01:00
Matt Borland
6b48f06f07 Improve handling of NANs in fdim 2023-01-03 17:12:49 +01:00
Matt Borland
5ebeddef31 Simplify fmax type promotion logic 2023-01-03 14:29:29 +01:00
Matt Borland
d27c7f43e6 Improve handling of NANs in fmax 2023-01-03 14:28:21 +01:00
Matt Borland
51fb875730 Simplify fmin type promotion logic 2023-01-03 14:25:00 +01:00
Matt Borland
a10abc2767 Improve handling of NANs in fmin 2023-01-03 14:21:58 +01:00
Matt Borland
c6e8d0e6eb Improve handling of NANs in hypot 2023-01-03 14:13:53 +01:00
Matt Borland
c7513bea7d Improve handling of NANs in logb 2023-01-03 14:05:09 +01:00
Matt Borland
fb21f21822 Improve handling of NANs in sqrt 2023-01-03 13:58:01 +01:00
Alexander Grund
c91659e368 Use size_t in size_to_precision
As the trait is supposed to be called with `sizeof` the type should be `size_t`
This avoids a conversion warning on e.g. GCC until 10.4
2022-12-28 13:50:52 +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
979d5931dd Merge pull request #888 from boostorg/885-no-cbrt
Remove using std::cbrt to fix build on platforms which don't support it.
2022-12-05 07:11:55 -08: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
Nick Thompson
3d6a7fb832 Remove using std::cbrt to fix build on platforms which don't support it. 2022-12-03 07:55:21 -08:00
Matt Borland
4e77917d85 Merge pull request #864 from mborland/warnings
Fix warnings in special functions
2022-11-29 08:42:26 -08:00
jzmaddock
20fc2addea More and better handling of ibeta small args. 2022-11-27 19:14:14 +00:00
jzmaddock
ea70672db7 Fix gcc -fno-exception build. 2022-11-26 09:20:37 +00:00
jzmaddock
c6fccc286e Correct concept failures. 2022-11-25 19:51:00 +00:00
jzmaddock
18fd65aaa1 Make inverses overflow safe. 2022-11-25 17:45:01 +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
aad4f85955 Improve powm1 error handling.
Makes 0^-n an overflow error (which matches std::pow which returns +INF rather than a NaN).
Fixes https://github.com/boostorg/math/issues/781.
2022-11-24 18:43:32 +00:00
Matt Borland
23b1fba8e7 Fix -Wimplicit-const-int-float-conversion (#879) 2022-11-15 18:45:22 -08:00
jzmaddock
2cdabeb30e Merge pull request #875 from boostorg/issue873
Correct root finders in extreme cases.
2022-11-15 09:00:39 +00:00
jzmaddock
9a9bb9ddc8 Update root bracketing to home in faster.
Special case for when the exponent range is so large that it basically takes "forever" to bracket otherwise.
2022-11-13 17:08:19 +00:00
Matt Borland
03ac231b83 Fix for issue #871 (#872) 2022-11-13 07:25:12 -08: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