Commit Graph

2189 Commits

Author SHA1 Message Date
Nick
4be4fec1ef
Merge pull request #225 from boostorg/autodiff/lexical_cast
Remove lexical_cast<> dependencies.
2019-07-07 08:54:45 -04:00
jzmaddock
1c45b8f1c8 catmull_rom: correct sign of loop variable.
Corrects previous commit.
See: https://github.com/boostorg/math/issues/226
2019-07-07 09:22:45 +01:00
jzmaddock
0275428d5a Catmull_rom: fix vc12 and vc14 errors highlighted by the new tests. 2019-07-06 20:29:11 +01:00
John Maddock
1f86711491 Merge branch 'develop' of https://github.com/boostorg/math into develop 2019-07-06 09:02:21 +01:00
jzmaddock
ed38d8f556 catmull_rom.hpp: Added missing include.
Fix concept tests and add them to the Jamfile.v2
Fixes: https://github.com/boostorg/math/issues/226
2019-07-06 09:00:50 +01:00
Matt Pulver
ee4a4181f0 Remove lexical_cast<> dependencies. 2019-07-05 08:51:59 -04:00
pabristow
88df85466b [CI SKIP] Added more dianostic info and changed minimum tolerance to 2 * epsilon from epsilon /2. 2019-07-04 16:16:54 +01:00
jzmaddock
472e34efc4 Merge branch 'develop' into hypergeometric_soc_2014 2019-07-02 18:12:43 +01:00
jzmaddock
c6fb970ec6 1F1: Doc update. 2019-07-02 18:09:42 +01:00
jzmaddock
a7b5082d4b Simplify termination condition for detail::hypergeometric_series. 2019-07-02 17:43:50 +01:00
pabristow
a368b618c8 Warning fixes for MSVC 14.1 and 14.2 2019-07-02 17:36:07 +01:00
Nick
72af67491e
Merge pull request #220 from boostorg/cardinal_quadratic_b_spline
Cardinal quadratic B-spline interpolation.
2019-06-27 19:37:45 -04:00
Nick Thompson
8d549cd0cf Ooura Fourier integrals: Fix warnings on MSVC [CI SKIP] 2019-06-26 17:54:21 -04:00
Nick Thompson
a3b60e647f Cardinal quadratic B-spline interpolation. 2019-06-26 08:50:00 -04:00
Nick
21daaf9a90
Merge pull request #219 from boostorg/whittaker_shannon
Whittaker shannon
2019-06-26 06:58:27 -04:00
pulver
95defb67df
Add make_ftuple(), digamma(), lgamma(), tgamma(), doc/test updates. (#218)
Improve tests and coverage. C++11/14 support. (@kedarbhat)
2019-06-25 17:31:48 -07:00
Nick
dc373ee009
Merge pull request #107 from boostorg/ooura_fourier_transform
Ooura's method for computing Fourier sin and Fourier cosine… [CI SKIP]
2019-06-24 09:40:59 -04:00
Nick Thompson
260a3af015 Whittaker-Shannon: Update docs, implement derivatives. 2019-06-24 08:28:14 -04:00
Nick Thompson
8b90659666 Ooura Fourier integrals: Green up appveyor build. 2019-06-22 18:26:48 -04:00
Nick Thompson
118b18c248 Merge branch 'develop' into issue204 2019-06-22 09:29:01 -04:00
Nick Thompson
07dd1e2c91 Ooura Fourier integrals: Fix Appveyor build. 2019-06-22 09:27:36 -04:00
Nick Thompson
91ef47c0eb Merge branch 'develop' into ooura_fourier_transform [CI SKIP] 2019-06-22 09:20:55 -04:00
Nick Thompson
95eef16b0b Ooura Fourier integrals: Use (std::numeric_limits<Real>::min)() to compiile on windows. 2019-06-20 07:14:23 -04:00
Nick Thompson
b2c2f0e644 Whittaker-Shannon interpolation: Derivative works, but is not sufficiently accurate. Some floating point manipulations are still required. [CI SKIP] 2019-06-19 09:42:50 -04:00
Nick Thompson
3a8a44a327 Merge branch 'develop' into vector_barycentric 2019-06-19 07:21:03 -04:00
Nick Thompson
a1149ce7f0 Whittaker-Shannon interpolation: Use PIMPL idiom. [CI SKIP] 2019-06-19 06:53:01 -04:00
Nick Thompson
2d770b9d32 Vector barycentric rational: Enable compilation with containers which do not have multiplication/division/addition defined on them. 2019-06-17 08:28:45 -04:00
Nick Thompson
92f678b32a Remove pessimistic comment about quality of memory estimate for nodes and weights. In addition, prevent push_back catastrophe. [CI SKIP] 2019-06-16 12:05:43 -04:00
Nick Thompson
8e3f5d50c8 Explain purpose of nodes/weights [CI SKIP] 2019-06-15 12:55:38 -04:00
Nick Thompson
bfb6689433 Remove gratuitous C++17isms from code. 2019-06-15 10:11:17 -04:00
Nick Thompson
92a14241f6 Meaningless commit to kick off another build 2019-06-14 21:43:55 -04:00
Nick Thompson
119c286bc6 Merge branch 'develop' into ooura_fourier_transform 2019-06-14 09:05:24 -04:00
Nick Thompson
6cd90d38d2 Improve documentation and kick off build. 2019-06-14 08:55:47 -04:00
jzmaddock
050679a933 Update test_roots.cpp to test in the negative half of the domain as well as the positive half.
Fix resulting bugs discovered.
Completes fix for https://github.com/boostorg/math/issues/216.
2019-06-14 08:36:16 +01:00
Nick Thompson
81c92932a4 Get rid of scoped_lock to compile on clang. [CI SKIP] 2019-06-13 18:16:24 -04:00
jzmaddock
882fb5c76d roots: Fix conceptual error in unpacking a single value. 2019-06-13 12:48:52 +01:00
John Maddock
2c46c4e9ca Merge branch 'develop' into issue204 2019-06-13 11:53:18 +01:00
Nick Thompson
f38e74570b Ooura Fourier Integrals: Return {I, err} rather than I [CI SKIP] 2019-06-12 07:09:09 -04:00
Nick Thompson
a6ca778176 Ooura Fourier Sine: Add levels after precomputed levels are exhausted. [CI SKIP] 2019-06-11 09:00:03 -04:00
Nick Thompson
f595b6a8f6 Cleanup before refactoring. [CI SKIP] 2019-06-11 07:21:24 -04:00
Nick Thompson
e659c69fc2 The nodes and weights must be computed in higher precision than the working precision or else the error decreases to a point and then begins to increase. [CI SKIP] 2019-06-07 13:26:34 -04:00
Nick Thompson
43d76caa25 Precompute nodes and weights. This is somewhat suboptimal, since it requires a priori assumptions about the asymptotic behavior of the integrand. But the alternative is that the class is slow. [CI SKIP] 2019-06-07 12:49:23 -04:00
pabristow
67dc112ba0 Cosmetic enhancements to BOOST_MATH_INSTRUMENT diagnostic output. 2019-06-05 12:22:52 +01:00
pabristow
3073aa063c Tentative fix for failure to converge, https://github.com/boostorg/math/issues/216 2019-06-05 10:23:19 +01:00
jzmaddock
7c87ee09d4 recurrence.hpp: Fix rescaling code. 2019-06-04 17:53:00 +01:00
jzmaddock
239134c5f5 1F1: Correct conceptual error. 2019-06-04 17:52:21 +01:00
jzmaddock
9a30204a6c Gamma: make sure lgamma returns the sign of result correctly in the multiprecision case. 2019-06-04 17:51:44 +01:00
jzmaddock
aec0e833f0 pFq: lots of rescaling fixes. 2019-06-04 17:51:03 +01:00
jzmaddock
f821c4e373 1F1: If recursion would result in too many steps, try the series instead. 2019-06-04 17:50:13 +01:00
jzmaddock
e1f2c68cbe 1F1: Add missing using declaration in large_abz case. 2019-06-04 17:49:15 +01:00
jzmaddock
207005dcfb 1F1: Don't use infinity in hypergeometric_1F1_bessel.hpp, it breaks the concept checks. 2019-06-04 17:48:38 +01:00
Nick Thompson
725544c1fb small details [CI SKIP] 2019-06-04 12:13:59 -04:00
Nick Thompson
a48551221e Merge branch 'ooura_fourier_transform' of https://github.com/boostorg/math into ooura_fourier_transform [CI SKIP] 2019-06-04 12:00:13 -04:00
Nick Thompson
b06fbdbc5f merge develop [CI SKIP] 2019-06-04 11:54:51 -04:00
Nick Thompson
a97edb1139 Allow use of std::array [CI SKIP] 2019-06-04 11:47:17 -04:00
Nick
8f8b56019d Add missing include [CI SKIP] 2019-06-04 10:28:34 -04:00
jzmaddock
9432e32afa
Merge pull request #210 from boostorg/catmull_cxx11
Backport catmull_rom.hpp to C++11.
2019-05-30 21:03:48 +01:00
Nick
18feb0fc2a Documentation, more unit tests [CI SKIP] 2019-05-30 13:25:53 -04:00
Nick Thompson
9e21a89675 fix move constructor use [CI SKIP] 2019-05-30 11:12:38 -04:00
Nick
2f725f0299 Tests for vector-valued barycentric rational. [CI SKIP] 2019-05-29 15:52:23 -04:00
Nick Thompson
1f9e18e63b First pass at vector-valued interpolation in barycentric rational 2019-05-29 11:35:54 -04:00
jzmaddock
e415650f86 prime: Correct value of max_prime and add test.
Fixes https://github.com/boostorg/math/issues/214.
2019-05-26 11:45:35 +01:00
jzmaddock
15bfc148c7 roots.hpp: correct flaw in previous commit.
If the next step jumps out of bounds, we need to fix up the sign of
the result, otherwise the bounds get incorrectly updated.
2019-05-26 09:56:22 +01:00
jzmaddock
70162dbcb8 Update second order root finding code to bracket root when required.
When min and max differ by many orders of magnitude (as happens when one is
zero for example), then bisection can take a very long time to iterate down to
the root.  Instead use a bracketing strategy which doubles the step size with
each iteration until a bracket is found, then repeat recursively as required
until we have a reasonably small interval.  Note that this only kicks in when
a Halley step goes out of bounds and we're therefore forced to thrash around
looking for the root.  Fixes: https://github.com/boostorg/math/issues/204.
2019-05-25 18:18:20 +01:00
jzmaddock
bbcd180273 catmull_rom - second try at back porting to C++11. 2019-05-23 08:54:11 +01:00
jzmaddock
1b10acf47f Backport catmull_rom.hpp to C++11.
See https://github.com/boostorg/math/issues/208.
2019-05-22 19:38:34 +01:00
jzmaddock
9803ed1fa0
Merge pull request #207 from boostorg/ellint-range
Update the range of the elliptic integrals to support the k > 1 case.
2019-05-20 13:34:50 +01:00
jzmaddock
d11eb67c67 ellint_d: extend range to k > 1 same ellint_1/2/3. 2019-05-19 08:54:17 +01:00
jzmaddock
a033166f7f Elliptic Integrals: extend range of ellint_1/2/3.
See https://github.com/boostorg/math/issues/183.
2019-05-18 19:36:22 +01:00
Nick Thompson
c8062fbc90 Allow generic random access containers other than std::vector for Catmull-Rom. 2019-05-16 18:03:57 -04:00
jzmaddock
03cb3f04b5 Ellint_1: remove redundant check.
Fixes https://github.com/boostorg/math/issues/196.
2019-05-13 19:40:36 +01:00
jzmaddock
63f09b4c30 ellint_3: rearrange special cases for better performance and to avoid redundant check.
Fixes https://github.com/boostorg/math/issues/197.
2019-05-13 19:16:00 +01:00
jzmaddock
1e4703becb 1F1: remove some cases from direct series evaluation with negative z: better to go via the large abz code instead. 2019-05-13 18:05:19 +01:00
jzmaddock
d690ab88e9 1F1: regular series: when the maxima of the series is a long way from the origin, jump straight to it and work outwards from there. 2019-05-13 18:03:53 +01:00
jzmaddock
1e7a3e1e38 pFq: Figure out where the maxima of the series are and work outwards from there. 2019-05-13 18:02:53 +01:00
jzmaddock
a75d67b523 1F1: Update costs and preconditions in large abz case. 2019-05-13 18:01:42 +01:00
jzmaddock
c759981a2a Improve performance of sin_pi and cos_pi:
Use a static_cast to int when available for parity checking as it's much faster than itrunc.
Don't check for overflows in the result, since we know the result is in [-1,1].
2019-05-03 19:11:03 +01:00
jzmaddock
24b410d0b0 unchecked_factorial: correct numeric_limits usage to not instantiate numeric_limits<__float128>. 2019-04-30 18:22:16 +01:00
jzmaddock
9b1e5561af LambertW: break dependency to cstdfloat.hpp - it causes all sorts of failures based on include order. 2019-04-29 18:29:38 +01:00
jzmaddock
f265221bf6 Merge branch 'develop' of https://github.com/boostorg/math into develop 2019-04-28 20:36:53 +01:00
jzmaddock
e125ac18ab unchecked_factorial: when using a non-builtin type, default to the builtin versions if the precision is small enough. Requires updating beta.hpp as well. 2019-04-28 20:36:05 +01:00
jzmaddock
e414e316ab
Merge pull request #191 from boostorg/float128_patches_2
Next set of float128 patches for better std lib support.
2019-04-27 19:03:48 +01:00
John Maddock
067e778d75 Merge branch 'autodiff' of https://github.com/pulver/math into autodiff 2019-04-23 18:04:27 +01:00
jzmaddock
2bc18d3d44 On hypergeometric_soc_2014: working 2019-04-23 17:58:20 +01:00
jzmaddock
350d9a3cd1 1F1: Correct use of precision changing in pFq.
Correct test values which were effected by the above issue.
2019-04-21 19:03:54 +01:00
jzmaddock
70809e3c06 1F1: Add heuristic for large a in negative b regions. 2019-04-21 19:02:31 +01:00
jzmaddock
eddde433ec 1F1: Correct negative b regions for large a case. 2019-04-17 18:39:27 +01:00
jzmaddock
648ebfdc25 1F1: Add regularized version. 2019-04-17 18:27:42 +01:00
jzmaddock
2e1e8a0038 Supress macro expansion of isless etc 2019-04-14 12:09:44 +01:00
jzmaddock
f520bc9dff 1F1: Allow log_pochhammer to work when the argument is a negative integer as long as it doesn't cross the origin. Remove special series code for b < 0 as this now always goes to the checked implementation. 2019-04-14 09:50:35 +01:00
jzmaddock
b265ce14cf 1F1: Improve method selection logic for a,b < 0. 2019-04-14 09:49:11 +01:00
jzmaddock
08a47dba2d 1F1: Correct precision obtained calculation in hypergeometric_pFq. 2019-04-14 09:47:27 +01:00
jzmaddock
b3b0dd36de 1F1: correct rescaling in hypergeometric_1F1_checked_series_impl. 2019-04-14 09:46:17 +01:00
Nick
165cf9e480 Vectorize mean calculation. 2019-04-13 17:22:24 -04:00
jzmaddock
91731ab5fa 1F1: Fix up b < 0 domain for extended precision types.
Update docs for b < 0 case.
2019-04-08 18:25:40 +01:00
jzmaddock
b8c9267aec 1F1: better map out the regions for b < 0 where forwards/backwards recursion are stable and make use of them. 2019-04-05 18:56:46 +01:00
jzmaddock
fb4c9f669d pFq: Make sure we're using the correct precision. 2019-04-05 18:55:21 +01:00
jzmaddock
a94c402327 1f1: Make calls to tgamma/lgamma qualified. 2019-04-05 18:54:47 +01:00
jzmaddock
9b0d249f68 pFq: Add rescaling if term when b crosses the origin underflows. 2019-04-05 18:54:10 +01:00
jzmaddock
805161a5c8 1F1: Correct some conceptual errors in hypergeometric_1F1_by_ratios.hpp. 2019-04-05 18:53:23 +01:00
Nick Thompson
166e5fb513 Remove control character(?) from comment. [CI SKIP] 2019-04-03 19:39:49 -04:00
jzmaddock
4bc056bf9e
Make __float128 iostream operator inline. 2019-04-02 08:34:25 +01:00
jzmaddock
35dfb36af2
Add <ionstream> include for __float128 io operator. 2019-03-30 08:35:29 +00:00
jzmaddock
16ffd8b7e9 Fix typos in last commit 2019-03-27 18:58:35 +00:00
jzmaddock
05360ce5e8 Big reformat of cstdfloat header and code, removes the tabs. 2019-03-27 18:29:25 +00:00
jzmaddock
a9201f9a44 Add more cstdfloat functions for __float128 2019-03-26 19:57:11 +00:00
jzmaddock
f7f3e2301f Apply __float128 patches from Gero Peterhoff. 2019-03-24 19:08:49 +00:00
jzmaddock
072ebaac25 Apply numeric_limits patches for __float128 from Gero Peterhoff. 2019-03-22 19:45:35 +00:00
jzmaddock
08b7a6145f Correct lgamma multiprecision case to correctly return sign of tgamma when requested.
Found while testing 1F1.
2019-03-21 20:14:48 +00:00
jzmaddock
1313bf6d28 1F1: refine b < 0 a > 0 region. 2019-03-21 12:45:36 +00:00
jzmaddock
a41421a8e5 1F1: Correct selection logic for forward-ratio on negative b method.
[CI SKIP]
2019-03-17 19:08:55 +00:00
jzmaddock
aa916169d4 1F1: Add better support for a > 0, b < 0 with additional method of ratios.
[CI SKIP]
2019-03-17 17:00:54 +00:00
jzmaddock
31cc6ee069 1F1: Add missing doc files.
[CI SKIP]
2019-03-16 16:58:58 +00:00
jzmaddock
e07c435a0c 1F1: Fine tune recurrence on a and b for large abz case.
Update tests.
2019-03-11 19:20:36 +00:00
jzmaddock
33e67bb94d 1F1: Fine tune negative a,b fallback code, update tests. 2019-03-11 12:05:04 +00:00
jzmaddock
f28a934dcd 1F1: fine tune when Tricomi's approximation is taken. 2019-03-11 12:02:53 +00:00
jzmaddock
38d281e86a 1F1: correct spurious overflow in hypergeometric_1f1_recurrence_on_z. 2019-03-11 12:01:46 +00:00
jzmaddock
8d0a794b38 Suppress gcc warning from the use of Q constants when -pedantic is in effect 2019-03-02 19:43:41 +00:00
pulver
2ffd44200a
Merge branch 'develop' into autodiff 2019-02-28 08:45:53 -05:00
jzmaddock
9a41f39707 1F1: Add missing using declaration. 2019-02-26 18:39:44 +00:00
jzmaddock
28f5e46528 lgamma: switch to taylor series at z = 1 for lgamma with no lanczos support.
Previous version was non-convergent under some conditions.
2019-02-26 18:39:14 +00:00
jzmaddock
7c75df1a21 1F1: fix conceptual error in hypergeometric_1F1_small_a_negative_b_by_ratio. 2019-02-26 18:36:20 +00:00
jzmaddock
39c3d03db2 1F1: simplify log_pochhammer, add new test cases.
[CI SKIP]
2019-02-24 09:43:54 +00:00
jzmaddock
fa875495e2 1F1: Update logic to determine when to apply Kummer's transformation.
[CI SKIP]
2019-02-23 19:25:27 +00:00
jzmaddock
2618f779e6 1F1: correct/improv e method selection logic. 2019-02-23 18:39:51 +00:00
jzmaddock
9416a8d1c3 1F1: temporarily use ADL to find tgamma/lgamma to improve mpfr performance when generating test values. 2019-02-23 18:39:05 +00:00
jzmaddock
7386544439 1F1: Fixes for small b values when recursing. 2019-02-23 18:37:56 +00:00
jzmaddock
d92810c00b 1F1: Use a checked series summation for the Tricomi approximation as we can't always tell when it will be divergent in advance. 2019-02-23 18:37:23 +00:00
jzmaddock
bf4f3b6ced 1F1: Apply scaling to hypergeometric_1f1_recurrence_on_z_minus_zero. 2019-02-23 18:35:45 +00:00
jzmaddock
332fb32919 Merge branch 'develop' into hypergeometric_soc_2014
[CI SKIP]
2019-02-21 13:03:04 +00:00
jzmaddock
a3bb22494a Root finding: correct bug where we could incorrectly terminate when the last iteration was pathological and we had to bisect. Fixes: https://github.com/boostorg/math/issues/184. 2019-02-20 20:53:00 +00:00
jzmaddock
2d0e3db2db 1F1: Picked off a couple more bug cases, some more are currently "unfixable" and lodged as such.
[CI SKIP]
2019-02-18 19:31:17 +00:00
jzmaddock
23de7a57af big_constant.hpp: fully qualify names so they can be used outside namespace boost::math.
[CI SKIP]
2019-02-17 15:58:40 +00:00
jzmaddock
5c663c558d 1F1: Correct cancellation bug in log_pochhammer.
Refine termination condition for series.
Add previously failing tests to bug cases.
2019-02-17 15:57:33 +00:00
jzmaddock
f4e5abfbb1 pFq: Add timeout support to hypergeometric_pFq_precision.
[CI SKIP]
2019-02-17 10:00:53 +00:00
jzmaddock
867b68440c 1F1: Fix bug in recurrence relations. 2019-02-17 10:00:03 +00:00
pulver
4d8622d9bd
Merge branch 'develop' into autodiff 2019-02-16 15:06:12 -05:00
jzmaddock
bd9599fe3f 1F1: hypergeometric_1F1_small_a_negative_b_by_ratio doesn't work when b + i == a for some integer i. 2019-02-16 12:13:07 +00:00
jzmaddock
00dfd44470 1F1, asymptotic-z region: don't use logs unless we really have to.
Also don't take this branch when |a| is really small.
2019-02-16 12:11:49 +00:00
jzmaddock
612c827bc6 Hypergeometrics: add pFq to specified precision. 2019-02-15 20:00:55 +00:00
jzmaddock
a060a48a01 1F1: Add better support for very small a when b < 0. 2019-02-15 20:00:15 +00:00
jzmaddock
da18aae70f More warning suppression, fix function signatures. 2019-02-15 19:59:21 +00:00
jzmaddock
76cb52af91 Bit of msvc warning suppression. 2019-02-15 19:58:15 +00:00
Matt Pulver
1bf3ba6bd2 Fix example compiler requirements. Add <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj to test/Jamefile.v2. Minor doc/code updates. 2019-02-14 10:54:42 -05:00
Nick Thompson
b44f37845a Use m_x(std::move(x)) rather than m_x{std::move(x)}. 2019-02-12 11:50:21 -07:00
jzmaddock
a71c2c0887 1F1, A&S 13.3.6 selection logic: improve estimate of Bessel I convergence rate so we don't accidentally take this method when it is non-convergent. 2019-02-12 18:14:28 +00:00
jzmaddock
fa3e94ff79 1F1: large z case: can't have b-a as a negative integer. 2019-02-12 18:09:14 +00:00
jzmaddock
9eb6d5fc58 1F1, hypergeometric_1F1_backwards_recursion_on_b_for_negative_a: correct use of scaling. 2019-02-12 18:08:21 +00:00
jzmaddock
61af0415f4 1F1: large abz: Can't use A&S 13.3.6 when b-a = 1/2. 2019-02-12 18:07:19 +00:00
jzmaddock
71340ca0ad 1F1: extend A&S 13.3.6 to large z. 2019-02-12 18:06:15 +00:00