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

1554 Commits

Author SHA1 Message Date
jzmaddock
37783e519a Bessel_I0: decimal number types shouldn't use numeric_limits::digits to judge precision. 2017-05-21 08:49:06 +01:00
jzmaddock
bc37badb91 Change signbit to normalise the result when using std::signbit. 2017-05-15 18:28:32 +01:00
jzmaddock
5db9e8870b Legendre_stieltjes: hook up tests.
Add concept checks.
Fix some warnings, and reduce dependencies.
2017-05-09 19:13:44 +01:00
jzmaddock
83891e2b79 Merge branch 'legendre_stieltjes' of https://github.com/NAThompson/math into stieltjes 2017-05-09 18:36:53 +01:00
jzmaddock
27ded3276d Remove C++11 isms from, legendre_prime header and tests - we don't want to break existing C++03 code using that header. 2017-05-09 12:18:43 +01:00
jzmaddock
97a4184df9 Hook up concept checks for legendre_p_prime.
Fix errors from above, add domain-error handling to the function.
2017-05-08 19:47:02 +01:00
jzmaddock
150a0b5afa Merge branch 'legendre_derivatives' of https://github.com/NAThompson/math into legrende_prime
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2017-05-08 19:14:16 +01:00
jzmaddock
1d0880a9ef Remove dependencies on format and type_index. 2017-05-06 13:16:31 +01:00
jzmaddock
87ab68456d Improve interpolator documentation and examples. 2017-05-06 12:26:37 +01:00
jzmaddock
6e8687812f Add concept checks for barycentric_rational. 2017-05-05 13:12:25 +01:00
jzmaddock
80e7f7027c Merge branch 'barycentric' of https://github.com/NAThompson/math into interpolate_rat
Fix some msvc failures.
Suppress some compiler warnings.
Added iterator based constructor.
Moved docs to better position.

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2017-05-05 13:01:56 +01:00
jzmaddock
d300f98fdc Fix msvc compiler errors in barycentric code. 2017-05-04 13:27:41 +01:00
jzmaddock
adc2234d95 Merge branch 'barycentric' of https://github.com/NAThompson/math into interpolate_rat
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2017-05-04 13:18:05 +01:00
jzmaddock
b9362cb000 Add concept checks for cubic-spline code, and fix resulting errors. 2017-05-03 13:32:53 +01:00
jzmaddock
127178518d Add iterator based construction to cubic B spline. 2017-05-03 13:07:54 +01:00
jzmaddock
3141e075ed Fix min/max usage. 2017-05-02 20:06:53 +01:00
jzmaddock
9dd532e01a Merge branch 'develop' of https://github.com/NAThompson/math into interpolate 2017-05-02 19:30:31 +01:00
jzmaddock
6407bedb75 Bring polynomial gcd into line with new Boost.Integer code, and improve tests. 2017-05-02 19:12:18 +01:00
Nick Thompson
2bbadc69fb Place copyright notices in file. 2017-05-01 18:36:26 -06:00
Nick Thompson
4b4c4e9364 Legendre-Stieltjes polynomials. 2017-04-30 15:58:10 -06:00
jzmaddock
ceae76a526 Switch to using Boost.Integer gcd/lcm. 2017-04-24 19:26:23 +01:00
Nick Thompson
a918d0f331 Return all zeros of the Legendre polynomial at once; there seems to be no benefit to having the user calculate them one at a time. 2017-04-22 15:47:22 -05:00
jzmaddock
1c10933943 polynomial.hpp should not be including private Boost.Config header. 2017-04-20 19:23:02 +01:00
jzmaddock
fafda3176c Fix gcd tests and code for clang on Linux 2017-04-20 14:43:28 +01:00
jzmaddock
82e3949024 GCD: Don't enable variadics unless the compiler supports them.
Update docs.
Escape from variadic GCD early when the result hits unity.
2017-04-15 18:31:01 +01:00
jzmaddock
c1ab95b6cc Add rational and multiprecision types to common_factor_test.cpp.
Disable rational overloads if there is no numeric_limits support as boost::rational won't compile in that case anyway.
2017-04-15 18:13:30 +01:00
Nick Thompson
4110a69416 Zeros of Legendre polynomials. This uses a root bracketing given by Szego with an asymptotic by Tricomi to get a domain and an initial guess for the root, then refines it via Newton's method. 2017-04-14 15:51:39 -05:00
Nick Thompson
21bcf34a51 Derivative of Legendre polynomials of the first kind. Used to generate the weights of Gaussian quadratures. 2017-04-12 14:16:26 -05:00
jzmaddock
70e82419d5 Fix for expression template types. 2017-04-08 20:12:23 +01:00
jzmaddock
f74da283aa Add variadic gcd and lcm variations, update tests to match. 2017-04-08 19:42:33 +01:00
jzmaddock
e71629f1c0 Make gcd/lcm functions constexpr and noexcept where applicable. 2017-04-08 19:13:08 +01:00
jzmaddock
8ee33649c7 Remove dead code orphaned by previous commits. 2017-04-07 09:55:31 +01:00
jzmaddock
5ca0e2ead8 Tighten up polynomial-GCD algorithm selection.
Disallow GCD's of polynomials of bounded integers as overflow is too likely to occur.
2017-04-07 09:44:48 +01:00
jzmaddock
8e98f30cb2 Remove SFINAE-logic and replace with simpler numeric_limits based algorithm selection. 2017-04-07 09:43:40 +01:00
jzmaddock
39006ecaca Reinstate gcd of rational numbers. 2017-04-06 19:22:45 +01:00
jzmaddock
7795ad3fd1 Merge branch 'gcd_polynomial' into gcd_cpp14 2017-04-06 11:28:32 +01:00
jzmaddock
9d0dac1df9 gcd: add the function objects back.
Improve the gcd/lcm tests.
2017-04-04 18:29:45 +01:00
jzmaddock
e4c0fdb0f2 Make gcd/lcm independent of type_traits and mpl.
Later we'll try and reconcile this version with that in Boost.Integer.
2017-04-02 20:10:46 +01:00
jzmaddock
8c9709b317 Fix cases where wchar_t is not an intrinsic type.
Fixes: https://svn.boost.org/trac/boost/ticket/12944
2017-03-30 19:35:59 +01:00
Nick Thompson
4efe710855 Add tests detailing the use cases which make it difficult to use std::unique_ptr for pimpl idiom. Also, test that evaluating the spline outside the interpolation region succeeds as best it can. 2017-03-06 11:12:51 -06:00
Nick Thompson
446f8c415d Cite Kress's book 'Numerical Analysis' in MLA format. 2017-03-05 10:49:22 -06:00
Nick Thompson
2506d7ed1f Use PIMPL so that the interpolant can be passed as a functor. 2017-03-02 17:16:21 -06:00
Nick Thompson
2b9d88d352 Fixes suggested by code review of PR #57. 2017-03-02 11:54:55 -06:00
Nick Thompson
b157403fd9 Do not use Kahan summation to compute average; use update procedure that cannot overflow recommended by Knuth. 2017-02-27 20:58:42 -06:00
Nick Thompson
fee20ab932 Given a function f, known at evenly spaced samples y_j = f(a + jh),
this function constructs an interpolant using compactly supported cubic b splines.
The advantage of using splines of compact support over traditional cubic splines
is that compact support makes the splines well-conditioned.

The interpolant is constructed in O(N) time and can be evaluated in constant time.
Its error is O(h^4), and obeys the interpolating condition s(x_j) = f(x_j) for all samples.
In addition, f' can be estimated from s', albeit with lower accuracy.

This routine is cppcheck clean, and is clean under AddressSanitizer and MemorySanitizer.
2017-02-23 18:21:06 -06:00
jzmaddock
4c19a1ec34 Remove unneeded parameters in new beesel J/K code.
Also fix some multiprecision-conceptual errors.
2017-01-29 19:18:36 +00:00
jzmaddock
38eb9d3e38 Update docs for new Bessel K0 and K1 approximation code. 2017-01-24 18:35:54 +00:00
jzmaddock
fe66909b23 Reorder some declarations to keep GCC happy.
Remove some dead code.
2017-01-23 19:34:34 +00:00
jzmaddock
7922883e7b Add improved approximations for K0 and K1.
Based on http://www.advanpix.com/2016/01/05/rational-approximations-for-the-modified-bessel-function-of-the-second-kind-k1-for-computations-with-double-precision/
2017-01-23 17:45:51 +00:00
jzmaddock
2dc47a631a Improve constant initialization for I0 and I1. 2017-01-23 17:45:00 +00:00