jzmaddock
cbf6b96a09
Merge pull request #1079 from boostorg/issue1075
...
Update pre-computed constexpr Gauss and Gauss-Kronrod constants
2024-02-09 12:28:23 +00:00
jzmaddock
a57fb0a894
Reinstate root finding protection against huge jumps.
...
Apply error handling more rigorously to any root finding client.
Mark evaluation_error's as not reachable for code coverage.
Fixes https://github.com/boostorg/math/issues/184 .
2024-02-05 19:16:33 +00:00
Andrew Johnson
12e33a5db4
Avoid unused variable warning
2024-02-04 13:54:00 +02:00
jzmaddock
549baa5677
Correct gauss method selection logic.
2024-02-03 18:25:11 +00:00
jzmaddock
c5feae34bb
Simplify tables of constants in gauss and gauss_kronrod code.
...
Also mark up anything that uses BOOST_MATH_HUGE_CONSTANT as unreachable by code coverage as gcov seems to have an issue with it.
2024-02-02 18:48:57 +00:00
jzmaddock
87a905ab1a
Cast result of weights() calls to the correct type.
2024-02-01 19:10:52 +00:00
jzmaddock
c35f12c1f5
Update pre-computed constexpr Gauss and Gauss-Kronrod constants
...
to always store literal types.
Fixes: https://github.com/boostorg/math/issues/1077 .
2024-02-01 18:43:41 +00:00
Nick
fccad84bf5
Random search ( #1071 )
2024-01-24 17:26:24 -08:00
Nick
a1f7a305ee
Algorithm jSO ( #1065 )
...
Follows: Brest, Janez, Mirjam Sepesy Maucec, and Borko Boskovic. "Single objective real-parameter optimization: Algorithm jSO." 2017 IEEE congress on evolutionary computation (CEC). IEEE, 2017.
2024-01-22 14:06:52 -08:00
jzmaddock
9f5e81d4ea
Fix missing newline.
2024-01-21 10:26:53 +00:00
jzmaddock
469541984d
Improve cstdfloat iostream code.
...
Copies input stream parsing from multiprecision.
Fixes https://github.com/boostorg/math/issues/1064
This is still not "proper" iostream code, but it's much better than it was.
2024-01-20 19:04:59 +00:00
Nick
de9a1a0ee5
Fix race conditions in differential evolution ( #1063 )
...
Through a combination of silly mistakes, I missed a pile of race conditions in the OpenMP threading.
Switch to C++ threading. Note that this change requires serial generation of trial vectors.
Hopefully I can figure out to parallelize the generation of trial vectors to reduce the serial section a la Ahmdahl's law,
while simultaneously keeping thread sanitizer happy.
2024-01-17 10:20:41 -08:00
Nick
4ee83916c5
Differential evolution ( #1062 )
...
* Differential evolution
---------
Co-authored-by: Matt Borland <matt@mattborland.com >
2024-01-01 17:09:16 -08:00
Matt Borland
8332808ebc
Address review comments [CI SKIP]
2023-12-22 07:13:10 -05:00
Matt Borland
c4e15ddda0
Fix index for MSVC 14.0
2023-12-22 06:06:57 -05:00
Matt Borland
8d575067e9
Rename bessel components
2023-12-22 05:17:55 -05:00
Matt Borland
a8ee8eb5d8
Protect dependencies with macros
2023-12-22 05:15:38 -05:00
Matt Borland
de67ad3207
Rename our components
2023-12-22 05:09:32 -05:00
Matt Borland
bd49c8311a
Improve logic and shield other boost libraries in non-standalone mode
2023-12-21 08:33:23 -05:00
Matt Borland
e24e884562
Undef I after pushing onto the stack
2023-12-21 07:48:13 -05:00
Matt Borland
23d54b385b
Fix for msvc defining _Complex_I in complex.h
2023-12-21 07:20:24 -05:00
Matt Borland
b3a21bcbcb
Fix cstdfloat numeric limits detection macro for libstdc++14
2023-12-13 08:43:43 +01:00
Nick
e0c17f6856
Improve accuracy of quartic_roots ( #1056 )
2023-11-27 17:52:56 +01:00
Matt Borland
2dd018b8c7
Revert "Update version history."
...
This reverts commit d938d3e836 .
2023-11-18 08:30:17 +01:00
jzmaddock
d938d3e836
Update version history.
...
[CI SKIP]
2023-11-17 18:25:02 +00:00
Matt Borland
0c5b957300
Merge pull request #1051 from boostorg/1048
...
Fix for issue 1048
2023-11-17 10:59:10 +01:00
Matt Borland
fe377373e4
Use identity function in floor if val >= 1/epsilon
2023-11-16 11:26:41 +01:00
Matt Borland
d18964d5aa
Check update of xterm for denom of 0
2023-11-16 09:38:11 +01:00
jzmaddock
90c509398b
Improve error detection further.
2023-11-06 09:40:26 +00:00
jzmaddock
d7048ecfa7
Improve ccmath support detection.
...
See discussion in https://github.com/boostorg/math/pull/1045 .
2023-11-05 19:32:33 +00:00
jzmaddock
21230d698e
Correct header include order for standalone mode.
2023-11-03 18:46:23 +00:00
jzmaddock
6d6b0a8c82
Correct new headers include guards.
2023-11-03 18:37:33 +00:00
jzmaddock
7f39320b8d
Update/improve ccmath configuration.
2023-11-03 18:32:21 +00:00
Matt Borland
d298a15b1d
Reorder macro and add missing include
2023-11-03 08:27:30 +01:00
jzmaddock
ae6571af58
Qualify log1p calls.
...
This fixes ambiguous overloads in the multiprecision case between boost::multiprecision and boost::math versions of log1p.
See https://github.com/boostorg/multiprecision/pull/568#issuecomment-1790195318
2023-11-02 12:14:06 +00:00
ryanelandt
2c74b149b0
has_denorm_now ( #1029 )
...
* initial commit
* remove == std::denorm_present
* remove extra ) in ccmath/next
2023-10-30 09:37:29 +01:00
jzmaddock
c6f4a88809
Incorporate cast simplifications from https://github.com/boostorg/math/pull/880
...
Add tests and make sure everything is covered, and fix resulting errors.
2023-10-17 17:09:44 +01:00
Rose
0e3b29f389
ten should be a constexpr as a float
...
Its int counterpart is a constexpr, and the ten variable never changes, so for consistency, we should make float_type ten constexpr as welll.
2023-10-15 18:54:03 -04:00
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
AtariDreams
1722ef9261
k should be size_t ( #1031 )
2023-09-30 18:51:27 -07:00
jzmaddock
2d9d202ff1
Fix conceptual failures.
2023-09-01 17:21:25 +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
469bff7e17
Improve method selection logic in ibeta_power_terms
...
(Sterling version)
2023-08-31 12:36:19 +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
Matt Borland
0d941f0d07
Fix issue #1023 ( #1024 )
2023-08-28 13:10:58 -04: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
Christopher Kormanyos
7b37e2378b
Eliminate unused parameter
2023-08-22 19:35:53 +02:00