From 89216def5d0901cf4a3b8dd992fdbbf65fda63f9 Mon Sep 17 00:00:00 2001
From: Matt Borland
Date: Thu, 25 Mar 2021 15:02:10 +0300
Subject: [PATCH 01/21] Fix for beta link error (#580)
---
include/boost/math/special_functions/acosh.hpp | 1 +
include/boost/math/special_functions/asinh.hpp | 1 +
include/boost/math/special_functions/atanh.hpp | 1 +
include/boost/math/special_functions/log1p.hpp | 1 +
4 files changed, 4 insertions(+)
diff --git a/include/boost/math/special_functions/acosh.hpp b/include/boost/math/special_functions/acosh.hpp
index cdc4905599..9db69ec91a 100644
--- a/include/boost/math/special_functions/acosh.hpp
+++ b/include/boost/math/special_functions/acosh.hpp
@@ -22,6 +22,7 @@
#include
#include
#include
+#include
// This is the inverse of the hyperbolic cosine function.
diff --git a/include/boost/math/special_functions/asinh.hpp b/include/boost/math/special_functions/asinh.hpp
index e55a356284..3dc1f63f48 100644
--- a/include/boost/math/special_functions/asinh.hpp
+++ b/include/boost/math/special_functions/asinh.hpp
@@ -23,6 +23,7 @@
#include
#include
#include
+#include
// This is the inverse of the hyperbolic sine function.
diff --git a/include/boost/math/special_functions/atanh.hpp b/include/boost/math/special_functions/atanh.hpp
index 871a465a8c..c2d548dd32 100644
--- a/include/boost/math/special_functions/atanh.hpp
+++ b/include/boost/math/special_functions/atanh.hpp
@@ -22,6 +22,7 @@
#include
#include
#include
+#include
// This is the inverse of the hyperbolic tangent function.
diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp
index 7126cc8193..44b1844e70 100644
--- a/include/boost/math/special_functions/log1p.hpp
+++ b/include/boost/math/special_functions/log1p.hpp
@@ -21,6 +21,7 @@
#include
#include
#include
+#include
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
# include
From 3ecdffc2645ebde52f8845a1fc2dababbbc5248c Mon Sep 17 00:00:00 2001
From: jzmaddock
Date: Mon, 29 Mar 2021 13:25:09 +0100
Subject: [PATCH 02/21] Make gini calculation serial only for now. See
https://github.com/boostorg/math/issues/585
---
.../math/statistics/univariate_statistics.hpp | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/include/boost/math/statistics/univariate_statistics.hpp b/include/boost/math/statistics/univariate_statistics.hpp
index b24b1089e9..80ae50413a 100644
--- a/include/boost/math/statistics/univariate_statistics.hpp
+++ b/include/boost/math/statistics/univariate_statistics.hpp
@@ -413,6 +413,12 @@ inline auto median(RandomAccessContainer & v)
return median(std::execution::seq, std::begin(v), std::end(v));
}
+#if 0
+//
+// Parallel gini calculation is curently broken, see:
+// https://github.com/boostorg/math/issues/585
+// We will fix this at a later date, for now just use a serial implementation:
+//
template
inline auto gini_coefficient(ExecutionPolicy&& exec, RandomAccessIterator first, RandomAccessIterator last)
{
@@ -445,6 +451,27 @@ inline auto gini_coefficient(ExecutionPolicy&& exec, RandomAccessIterator first,
return detail::gini_coefficient_parallel_impl(exec, first, last);
}
}
+#else
+template
+inline auto gini_coefficient(ExecutionPolicy&& exec, RandomAccessIterator first, RandomAccessIterator last)
+{
+ using Real = typename std::iterator_traits::value_type;
+
+ if (!std::is_sorted(exec, first, last))
+ {
+ std::sort(exec, first, last);
+ }
+
+ if constexpr (std::is_integral_v)
+ {
+ return detail::gini_coefficient_sequential_impl(first, last);
+ }
+ else
+ {
+ return detail::gini_coefficient_sequential_impl(first, last);
+ }
+}
+#endif
template
inline auto gini_coefficient(ExecutionPolicy&& exec, RandomAccessContainer & v)
From d6e19aa2de722948f7e55f91084b8271a644e691 Mon Sep 17 00:00:00 2001
From: Peter Dimov
Date: Wed, 9 Jun 2021 19:49:17 +0300
Subject: [PATCH 03/21] Add CMakeLists.txt (from current develop)
---
CMakeLists.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000000..a55f9d9206
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Copyright 2020 Peter Dimov
+# Copyright 2021 Matt Borland
+# Distributed under the Boost Software License, Version 1.0.
+# https://www.boost.org/LICENSE_1_0.txt
+
+cmake_minimum_required(VERSION 3.5...3.16)
+
+project(boost_math VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
+
+add_library(boost_math INTERFACE)
+
+add_library(Boost::math ALIAS boost_math)
+
+target_include_directories(boost_math INTERFACE include)
+
+include(CMakeDependentOption)
+
+cmake_dependent_option(BOOST_MATH_STANDALONE "Use Boost.Math in standalone mode" ON "NOT BOOST_SUPERPROJECT_VERSION" OFF)
+
+message(STATUS "Boost.Math: standalone mode ${BOOST_MATH_STANDALONE}")
+
+if(BOOST_MATH_STANDALONE)
+
+ target_compile_definitions(boost_math INTERFACE BOOST_MATH_STANDALONE=1)
+
+else()
+
+ target_link_libraries(boost_math
+ INTERFACE
+ Boost::assert
+ Boost::concept_check
+ Boost::config
+ Boost::core
+ Boost::integer
+ Boost::lexical_cast
+ Boost::predef
+ Boost::random
+ Boost::static_assert
+ Boost::throw_exception
+ )
+
+endif()
+
+# Only enable tests when we're the root project
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+
+ include(CTest)
+ add_subdirectory(test)
+
+endif()
From a7bfb5a914bed5cdeeb826ca06bcbfc317280c95 Mon Sep 17 00:00:00 2001
From: jzmaddock
Date: Sun, 27 Jun 2021 19:38:05 +0100
Subject: [PATCH 04/21] Prep for 1.77: Rework hypergeometric distro equations.
Fix up Fibonacci docs. Fix Fibonacci constexpr and noexcept usage and add to
testing. Regenerate docs.
---
doc/distributions/hypergeometric.qbk | 24 +-
doc/equations/hypergeometric6.svg | 686 +++++++++++++++++-
doc/html/index.html | 2 +-
doc/html/indexes/s01.html | 34 +-
doc/html/indexes/s02.html | 10 +-
doc/html/indexes/s03.html | 2 +-
doc/html/indexes/s04.html | 3 +-
doc/html/indexes/s05.html | 82 ++-
doc/html/interpolation.html | 1 +
doc/html/math_toolkit/bilinear_uniform.html | 144 ++++
doc/html/math_toolkit/conventions.html | 2 +-
.../dist_ref/dists/hypergeometric_dist.html | 16 -
doc/html/math_toolkit/history1.html | 122 ++--
doc/html/math_toolkit/history2.html | 122 ++--
doc/html/math_toolkit/navigation.html | 2 +-
doc/html/math_toolkit/number_series.html | 2 +
.../number_series/fibonacci_numbers.html | 198 +++++
.../math_toolkit/number_series/primes.html | 6 +-
doc/html/math_toolkit/quintic_hermite.html | 6 +-
doc/html/math_toolkit/sf_gamma.html | 6 +-
doc/html/quadrature.html | 6 +-
doc/html/special.html | 2 +
doc/html/standalone_HTML.manifest | 2 +
doc/overview/roadmap.qbk | 12 +
doc/sf/number_series.qbk | 91 ++-
example/Jamfile.v2 | 2 +-
example/reciprocal_fibonacci_constant.cpp | 4 +
.../math/special_functions/fibonacci.hpp | 16 +-
test/Jamfile.v2 | 2 +-
test/test_fibonacci.cpp | 16 +-
30 files changed, 1460 insertions(+), 163 deletions(-)
create mode 100644 doc/html/math_toolkit/bilinear_uniform.html
create mode 100644 doc/html/math_toolkit/number_series/fibonacci_numbers.html
diff --git a/doc/distributions/hypergeometric.qbk b/doc/distributions/hypergeometric.qbk
index 89b9ce46f9..5780c788d5 100644
--- a/doc/distributions/hypergeometric.qbk
+++ b/doc/distributions/hypergeometric.qbk
@@ -229,18 +229,24 @@ gives the required CDF.
The median is simply the quantile at 0.5, and the remaining properties are
calculated via:
-[equation hypergeometric6]
+[/
+Requires amsmath and mathtools:
+
+\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
+\begin{equation*}
+\begin{split}
+mean & = \frac{rn}{N} \\
+mode & = \floor*{ \frac{(r+1)(n+1)}{N+2} }\\
+variance & = \frac{r(\frac{n}{N})(1-\frac{n}{N})(N-r)}{(N-1)}\\
+skewness & = \frac{(N-2n)\sqrt{(N-1)}(N-2r)}{\sqrt{rn(N-n)(N-r)}(N-2)}\\
+kertosis\:excess & = \frac{(N-1)N^2(N(N+1)-6r(N-r)-6n(N-n)+6nr(N-r)(N-n)(5N-6)}{nr(N-r)(N-n)(N-2)(N-3)}
+\end{split}
+\end{equation*}
-[note The kurtosis formula above is not quite correct and kurtosis excess is now calculated
-from
-[@https://www.wolframalpha.com/input/?i=kurtosis+hypergeometric+distribution Wolfram Alpha hypergeometric distribution kurtosis].
-(The hypergeometric distribution kurtosis excess is mentioned in
-[@https://mathworld.wolfram.com/HypergeometricDistribution.html Wolfram Hypergeometric distribution]
-but coyly only described as ['\"the kurtosis excess is given by a complicated expression.\"]).
-This has been found numerically equivalent to the
-[@https://en.wikipedia.org/wiki/Hypergeometric_distribution Wikipedia hypergeometric kurtosis excess formula].
]
+[equation hypergeometric6]
+
[endsect]
[/ hypergeometric.qbk
diff --git a/doc/equations/hypergeometric6.svg b/doc/equations/hypergeometric6.svg
index d53504b330..8be5ec9e65 100644
--- a/doc/equations/hypergeometric6.svg
+++ b/doc/equations/hypergeometric6.svg
@@ -1,2 +1,684 @@
-
-mean = r n N mode = floor ( ( r + 1 ) ( n + 1 ) N + 2 ) variance = r ( n N ) ( 1 − n N ) ( N − r ) ( N − 1 ) skewness = ( N − 2 n ) ( N − 1 ) ( N − 2 r ) r n ( N − n ) ( N − r ) ( N − 2 ) kurtosis excess = ( N 2 ( N − 1 ) r ( N − 2 ) ( N − 3 ) ( N − r ) ) ( N ( N + 1 ) − 6 N ( N − r ) n ( N − n ) + 3 r ( N − r ) ( N + 6 ) N 2 − 6 )
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/html/index.html b/doc/html/index.html
index 5f71a85558..c46436556c 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -134,7 +134,7 @@
-Last revised: June 16, 2021 at 10:35:24 GMT
+Last revised: June 27, 2021 at 18:26:02 GMT
diff --git a/doc/html/indexes/s01.html b/doc/html/indexes/s01.html
index ed5fcc8652..818036fcff 100644
--- a/doc/html/indexes/s01.html
+++ b/doc/html/indexes/s01.html
@@ -24,7 +24,7 @@
1 2 4 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
+addition
+
+
+
add_fn
@@ -277,7 +281,10 @@
at
-
+
atanh
@@ -1320,6 +1327,10 @@
+fibonacci
+
+
+
find_alpha
@@ -2060,6 +2071,7 @@
-means
-
-
-
means_and_covariance
@@ -2720,6 +2728,7 @@
Automatic Differentiation
Bessel Functions of the First and Second Kinds
Empirical Cumulative Distribution Function
+Fibonacci Numbers
Lanczos Smoothing Derivatives
Modified Bessel Functions of the First and Second Kinds
tanh_sinh
@@ -2765,6 +2774,7 @@
+set
+
+
+
set_zero
@@ -3631,6 +3649,10 @@
+unchecked_fibonacci
+
+
+
unreal
A B C D E F G H I K L M N O P Q R S T U V W
@@ -182,6 +186,10 @@
+fibonacci_generator
+
+
+
fisher_f_distribution
diff --git a/doc/html/indexes/s03.html b/doc/html/indexes/s03.html
index b5a850a116..cc4c2a8c5c 100644
--- a/doc/html/indexes/s03.html
+++ b/doc/html/indexes/s03.html
@@ -24,7 +24,7 @@
A B C D E F G H I K L N P R S T U V W
diff --git a/doc/html/indexes/s04.html b/doc/html/indexes/s04.html
index e93374726f..e60c7717cf 100644
--- a/doc/html/indexes/s04.html
+++ b/doc/html/indexes/s04.html
@@ -24,7 +24,7 @@
B F
@@ -308,6 +308,7 @@
BOOST_MATH_STANDALONE
diff --git a/doc/html/indexes/s05.html b/doc/html/indexes/s05.html
index 6e8b4bbce6..33bc41746c 100644
--- a/doc/html/indexes/s05.html
+++ b/doc/html/indexes/s05.html
@@ -23,7 +23,7 @@
1 2 4 5 7 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
+addition
+
+
+
add_fn
@@ -612,7 +616,10 @@
at
-
+
atanh
@@ -818,6 +825,22 @@
beta_distribution
+Bilinear Uniform Interpolation
+
+
+
+bilinear_uniform
+
+
+
binomial
@@ -1221,6 +1244,7 @@
BOOST_MATH_STANDALONE
@@ -2404,6 +2428,7 @@
Arithmetic-Geometric Mean
Automatic Differentiation
Barycentric Rational Interpolation
+Bilinear Uniform Interpolation
Binomial Distribution
Binomial Quiz Example
Bivariate Statistics
@@ -2430,6 +2455,7 @@
Exponential Integral Ei
Extreme Value Distribution
Factorial
+Fibonacci Numbers
Floating-Point Constant Macros
Gauss-Kronrod Quadrature
Gauss-Legendre quadrature
@@ -4142,6 +4168,7 @@
Elliptic Integral Overview
F Distribution
Factorial
+Fibonacci Numbers
Find Scale (Standard Deviation) Example
Finding Zeros of Bessel Functions of the First and Second Kinds
Gamma (and Erlang) Distribution
@@ -4232,10 +4259,6 @@
-F Distribution Examples
-
-
-
Facets for Floating-Point Infinities and NaNs
+fibonacci
+
+
+
+Fibonacci Numbers
+
+
+
+fibonacci_generator
+
+
+
file
Directory and File Structure
@@ -5129,6 +5175,7 @@
2
accuracy
airy_bi_zero
+BOOST_MATH_STANDALONE
bug
constants
cpp_dec_float
@@ -5588,6 +5635,7 @@
About the Math Toolkit
Algorithm TOMS 748: Alefeld, Potra and Shi: Enclosing zeros of continuous functions
Barycentric Rational Interpolation
+Bilinear Uniform Interpolation
Cardinal B-splines
Cardinal Cubic B-spline interpolation
Cardinal Quadratic B-spline interpolation
@@ -6016,6 +6064,7 @@
-means
-
-
-
means_and_covariance
@@ -6892,6 +6937,7 @@
Elliptic Integral Overview
Engel Expansion
Error Function erf and complement erfc
+Fibonacci Numbers
Finding Zeros of Airy Functions
Finding Zeros of Bessel Functions of the First and Second Kinds
Floating-Point Representation Distance (ULP), and Finding Adjacent Floating-Point Values
@@ -7324,6 +7370,7 @@
Automatic Differentiation
Bessel Functions of the First and Second Kinds
Empirical Cumulative Distribution Function
+Fibonacci Numbers
Lanczos Smoothing Derivatives
Modified Bessel Functions of the First and Second Kinds
tanh_sinh
@@ -7429,6 +7476,7 @@
A More complex example - Inverting the Elliptic Integrals
Barycentric Rational Interpolation
+Bilinear Uniform Interpolation
Cardinal Cubic B-spline interpolation
Cardinal Quadratic B-spline interpolation
Cardinal Quintic B-spline interpolation
@@ -7442,6 +7490,7 @@
Cubic Hermite interpolation
Daubechies Wavelets and Scaling Functions
Empirical Cumulative Distribution Function
+Fibonacci Numbers
Finding the Cubed Root With and Without Derivatives
Generalizing to Compute the nth root
Graphing, Profiling, and Generating Test Data for Special Functions
@@ -7598,6 +7647,7 @@
accuracy
Arithmetic-Geometric Mean
Bernoulli Numbers
+Bilinear Uniform Interpolation
Boost.Math Frequently Asked Questions (FAQs)
Boost.Math Tuning
C99 and C++ TR1 C-style Functions
@@ -8126,6 +8176,7 @@
@@ -8566,6 +8617,13 @@
+set
+
+
+
Setting Polices at Namespace Scope
diff --git a/doc/html/math_toolkit/bilinear_uniform.html b/doc/html/math_toolkit/bilinear_uniform.html
new file mode 100644
index 0000000000..346b4f4284
--- /dev/null
+++ b/doc/html/math_toolkit/bilinear_uniform.html
@@ -0,0 +1,144 @@
+
+
+
+Bilinear Uniform Interpolation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#include < boost / math / interpolators / bilinear_uniform . hpp >
+
+namespace boost :: math :: interpolators {
+
+template < class RandomAccessContainer >
+class bilinear_uniform
+{
+public :
+ using Real = typename RandomAccessContainer :: value_type ;
+
+ bilinear_uniform ( RandomAccessContainer && fieldData , decltype ( fieldData . size ()) rows , decltype ( fieldData . size ()) cols , Real dx = 1 , Real dy = 1 , Real x0 = 0 , Real y0 = 0 )
+
+ Real operator ()( Real x , Real y ) const ;
+};
+
+
+
+ The bilinear uniform interpolator takes a grid of data points specified by
+ a linear index and interpolates between each segment using a bilinear function.
+ Note that "bilinear" does not mean linear-it is the product of two
+ linear functions. The interpolant is continuous and its evaluation is constant
+ time. An example usage is as follows:
+
+
std :: vector < double > v { 0.1 , 0.2 , 0.3 ,
+ 0.4 , 0.5 , 0.5 };
+using boost :: math :: interpolators :: bilinear_uniform ;
+int rows = 2 ;
+int cols = 3 ;
+double dx = 1 ;
+double dy = 1 ;
+auto bu = bilinear_uniform ( std :: move ( v ), rows , cols , dx , dy );
+
+double z = bu ( 0.0 , 0.0 );
+
+
+ Periodically, it is helpful to see what data the interpolator has. This can
+ be achieved via
+
+
std :: cout << ub << "\n" ;
+
+
+ Note that the interpolator is pimpl'd, so that copying the class is cheap,
+ and hence it can be shared between threads. (The call operator is threadsafe.)
+
+
+ Note that the layout of the field data follows the convention found in laying
+ out images: The first value is associated with (x0, y0), and the last value
+ is associate with (x0 + (cols - 1)dx, y0 + (rows - 1)dy). This matches with
+ how we think about laying out matrices in C order, but of course there is no
+ canonical choice and conventions must be made. For example, it is traditional
+ in image processing the associate the first field value with the center of
+ the pixel (which would be called a cell-centered field in VTK). This interpolator
+ is point-centered, in the sense that (x0,y0) is associated with value v[0],
+ and (x0+dx, y0) associated with v[1]. If you have cell-centered data at (0,0),
+ then just pass (x0,y0) = (0.5, 0.5) to this interpolator.
+
+
+ Note that this interpolator does not provide the option for a rotation. We
+ regarded that as too expensive to handle in this class. Rotating the arguments
+ must be performed by the user.
+
+
+
+ The google/benchmark in reporting / performance / bilinear_uniform_performance . cpp
demonstrates
+ the cost of the call operator for this interpolator:
+
+
Run on ( 16 X 4300 MHz CPU s )
+CPU Caches :
+ L1 Data 32 K ( x8 )
+ L1 Instruction 32 K ( x8 )
+ L2 Unified 1024 K ( x8 )
+ L3 Unified 11264 K ( x1 )
+Load Average : 0.92 , 0.64 , 0.35
+--------------------------------------
+Benchmark Time
+--------------------------------------
+Bilinear < double >/ 64 13.6 ns
+Bilinear < double >/ 128 13.3 ns
+Bilinear < double >/ 256 13.9 ns
+Bilinear < double >/ 512 13.7 ns
+Bilinear < double >/ 1024 13.2 ns
+Bilinear < double >/ 2048 13.1 ns
+Bilinear < double >/ 4096 13.2 ns
+Bilinear < double >/ 8192 13.2 ns
+
+
+
+
+
+
+
diff --git a/doc/html/math_toolkit/conventions.html b/doc/html/math_toolkit/conventions.html
index 5b815d0c09..f0d0f19433 100644
--- a/doc/html/math_toolkit/conventions.html
+++ b/doc/html/math_toolkit/conventions.html
@@ -27,7 +27,7 @@
Document Conventions
-
+
This documentation aims to use of the following naming and formatting conventions.
diff --git a/doc/html/math_toolkit/dist_ref/dists/hypergeometric_dist.html b/doc/html/math_toolkit/dist_ref/dists/hypergeometric_dist.html
index 7b11aa9841..f204bcf3b5 100644
--- a/doc/html/math_toolkit/dist_ref/dists/hypergeometric_dist.html
+++ b/doc/html/math_toolkit/dist_ref/dists/hypergeometric_dist.html
@@ -342,22 +342,6 @@
-
diff --git a/doc/html/math_toolkit/history1.html b/doc/html/math_toolkit/history1.html
index 3d50c46e66..3ff59e77c4 100644
--- a/doc/html/math_toolkit/history1.html
+++ b/doc/html/math_toolkit/history1.html
@@ -38,6 +38,42 @@
+
+
+ This library can now be used entirely standalone, without the rest of Boost:
+ either use a compiler which supports __has_include
+ or define BOOST_MATH_STANDALONE
+ to enable standalone mode.
+
+
+ Add Bilinear Uniform Interpolation .
+
+
+ Add Fibonacci
+ Numbers .
+
+
+ Fix Hypergeometric Distribution kertosis, see #639 .
+
+
+ Fix closed Catmull-Rom curves to have the same start/end point. See #636 .
+
+
+ Correct Bernoulli number caching in multi-threading multiprecision case.
+
+
+ Re-enabled the ability to build in environments with no std lib threading
+ support. See #621 .
+
+
+ Correct Gini-coefficient parrellel calculation.
+
+
+
@@ -88,7 +124,7 @@
@@ -623,7 +659,7 @@
-
+
Math-2.2.0
(boost-1.58.0)
@@ -667,7 +703,7 @@
-
+
Math-2.1.0
(boost-1.57.0)
@@ -693,7 +729,7 @@
-
+
Math-2.0.0
(Boost-1.56.0)
@@ -744,7 +780,7 @@
-
+
Math-1.9.1
-
+
Math-1.9.0
-
+
Boost-1.55
@@ -885,7 +921,7 @@
and Accurate Parallel Inversion of the Gamma Distribution, Thomas Luu
-
+
Boost-1.54
@@ -939,7 +975,7 @@
-
+
Boost-1.53
-
+
Boost-1.52
-
+
Boost-1.51
See Boost-1.52 - some items were added but not listed in time for the release.
-
+
Boost-1.50
-
+
Boost-1.49
-
+
Boost-1.48
-
+
Boost-1.47
-
+
Boost-1.46.1
@@ -1185,7 +1221,7 @@
#5113 .
-
+
Boost-1.46.0
-
+
Boost-1.45.0
-
+
Boost-1.44.0
-
+
Boost-1.41.0
@@ -1239,7 +1275,7 @@
its inverse.
-
+
Boost-1.40.0
-
+
Boost-1.38.0
-
+
Boost-1.37.0
Improved accuracy and testing of the inverse hypergeometric functions.
-
+
Boost-1.36.0
-
+
Boost-1.35.0:
Post Review First Official Release
@@ -1359,7 +1395,7 @@
-
+
Milestone
4: Second Review Candidate (1st March 2007)
@@ -1373,7 +1409,7 @@
-
+
Milestone
3: First Review Candidate (31st Dec 2006)
@@ -1401,7 +1437,7 @@
-
+
Milestone
2: Released September 10th 2006
@@ -1437,7 +1473,7 @@
-
+
Milestone
1: Released March 31st 2006
diff --git a/doc/html/math_toolkit/history2.html b/doc/html/math_toolkit/history2.html
index 28cb77aac0..d62d163178 100644
--- a/doc/html/math_toolkit/history2.html
+++ b/doc/html/math_toolkit/history2.html
@@ -38,6 +38,42 @@
+ Math-3.1.0
+ (Boost-1.77)
+
+
+
+ This library can now be used entirely standalone, without the rest of Boost:
+ either use a compiler which supports __has_include
+ or define BOOST_MATH_STANDALONE
+ to enable standalone mode.
+
+
+ Add Bilinear Uniform Interpolation .
+
+
+ Add Fibonacci
+ Numbers .
+
+
+ Fix Hypergeometric Distribution kertosis, see #639 .
+
+
+ Fix closed Catmull-Rom curves to have the same start/end point. See #636 .
+
+
+ Correct Bernoulli number caching in multi-threading multiprecision case.
+
+
+ Re-enabled the ability to build in environments with no std lib threading
+ support. See #621 .
+
+
+ Correct Gini-coefficient parrellel calculation.
+
+
+
+
Math-3.0.0
(Boost-1.76)
@@ -88,7 +124,7 @@
-
+
Math-2.13.0
(Boost-1.75)
@@ -139,7 +175,7 @@
-
+
Math-2.12.0
(Boost-1.73)
@@ -181,7 +217,7 @@
-
+
Math-2.11.0
(Boost-1.72)
@@ -243,7 +279,7 @@
-
+
Math-2.10.0
(Boost-1.71)
@@ -277,7 +313,7 @@
-
+
Math-2.9.0
(Boost-1.70)
@@ -331,7 +367,7 @@
-
+
Math-2.8.0
(Boost-1.69)
@@ -388,7 +424,7 @@
-
+
Math-2.7.1
(Boost-1.68)
@@ -402,7 +438,7 @@
-
+
Math-2.7.0
(Boost-1.66)
@@ -419,7 +455,7 @@
-
+
Math-2.6.0
(Boost-1.65)
@@ -456,7 +492,7 @@
-
+
Math-2.5.2
(Boost-1.64)
@@ -473,7 +509,7 @@
-
+
Math-2.5.1
(Boost-1.63)
@@ -489,7 +525,7 @@
-
+
Math-2.5.0
(Boost-1.62)
@@ -514,7 +550,7 @@
-
+
Math-2.4.0
(Boost-1.61)
@@ -525,7 +561,7 @@
Polynomial arithmetic added to tools.
-
+
Math-2.3.0
(Boost-1.60)
@@ -604,7 +640,7 @@
-
+
Math-2.2.1
@@ -623,7 +659,7 @@
-
+
Math-2.2.0
(boost-1.58.0)
@@ -667,7 +703,7 @@
-
+
Math-2.1.0
(boost-1.57.0)
@@ -693,7 +729,7 @@
-
+
Math-2.0.0
(Boost-1.56.0)
@@ -744,7 +780,7 @@
-
+
Math-1.9.1
-
+
Math-1.9.0
-
+
Boost-1.55
@@ -885,7 +921,7 @@
and Accurate Parallel Inversion of the Gamma Distribution, Thomas Luu
-
+
Boost-1.54
@@ -939,7 +975,7 @@
-
+
Boost-1.53
-
+
Boost-1.52
-
+
Boost-1.51
See Boost-1.52 - some items were added but not listed in time for the release.
-
+
Boost-1.50
-
+
Boost-1.49
-
+
Boost-1.48
-
+
Boost-1.47
-
+
Boost-1.46.1
@@ -1185,7 +1221,7 @@
#5113 .
-
+
Boost-1.46.0
-
+
Boost-1.45.0
-
+
Boost-1.44.0
-
+
Boost-1.41.0
@@ -1239,7 +1275,7 @@
its inverse.
-
+
Boost-1.40.0
-
+
Boost-1.38.0
-
+
Boost-1.37.0
Improved accuracy and testing of the inverse hypergeometric functions.
-
+
Boost-1.36.0
-
+
Boost-1.35.0:
Post Review First Official Release
@@ -1359,7 +1395,7 @@
-
+
Milestone
4: Second Review Candidate (1st March 2007)
@@ -1373,7 +1409,7 @@
-
+
Milestone
3: First Review Candidate (31st Dec 2006)
@@ -1401,7 +1437,7 @@
-
+
Milestone
2: Released September 10th 2006
@@ -1437,7 +1473,7 @@
-
+
Milestone
1: Released March 31st 2006
diff --git a/doc/html/math_toolkit/navigation.html b/doc/html/math_toolkit/navigation.html
index 7748e49df6..4bd188e1ba 100644
--- a/doc/html/math_toolkit/navigation.html
+++ b/doc/html/math_toolkit/navigation.html
@@ -27,7 +27,7 @@
Navigation
-
+
Boost.Math documentation is provided in both HTML and PDF formats.
diff --git a/doc/html/math_toolkit/number_series.html b/doc/html/math_toolkit/number_series.html
index 2d7be9aaa8..77142c3685 100644
--- a/doc/html/math_toolkit/number_series.html
+++ b/doc/html/math_toolkit/number_series.html
@@ -31,6 +31,8 @@
Numbers
Tangent Numbers
Prime Numbers
+Fibonacci
+ Numbers
diff --git a/doc/html/math_toolkit/number_series/fibonacci_numbers.html b/doc/html/math_toolkit/number_series/fibonacci_numbers.html
new file mode 100644
index 0000000000..923a2a47df
--- /dev/null
+++ b/doc/html/math_toolkit/number_series/fibonacci_numbers.html
@@ -0,0 +1,198 @@
+
+
+
+Fibonacci Numbers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fibonacci numbers
+ (Fn ) follows the linear recurrence Fn =Fn-1 +Fn-2 starting with F0 =0, F1 =1.
+
+
+
+ Synopsis
+
+
#include < boost / math / special_functions / fibonacci . hpp >
+
+
namespace boost { namespace math {
+
+template < class T , class Policy >
+constexpr T fibonacci ( unsigned long long n )
+
+template < class T , class Policy >
+constexpr T fibonacci ( unsigned long long n , const Policy & pol )
+
+template < typename T >
+constexpr T unchecked_fibonacci ( unsigned long long n ) noexcept ( std :: is_fundamental < T >:: value ); {
+
+}}
+
+
+ The functions return Fn for a given input n
having type
+ T
.
+
+
+
+ Description
+
+
+ The checked versions checks for the overflow before starting the computation.
+ If n
is so large that the result can not be represented
+ in type T
, it then calls overflow_error .
+ The overflow check is susceptible to off-by-one errors around the overflow
+ limit. See Binet's Formula below for more details on the check.
+
+
+ These functions are all constexpr
+ from C++14 onwards, and in addition unchecked_fibonacci
+ is noexcept
when T is a fundamental
+ type.
+
+
+ The final Policy argument is optional and can
+ be used to control the behaviour of the function: how it handles errors,
+ what level of precision to use etc. Refer to the policy
+ documentation for more details .
+
+
+ If in the checked version, the overflow check succeeds then the unchecked
+ version is called which computes the desired Fn . Checked version is slower
+ because of the overhead involved in overflow check.
+
+
+
+ Generator
+
+
#include < boost / math / special_functions / fibonacci . hpp >
+
+
template < typename T >
+class fibonacci_generator {
+
+ T operator ()();
+
+ void set ( unsigned long long n );
+}
+
+
+ The generator returns consecutive fibonacci numbers starting with 0, 1, 1,
+ 2...
+
+
+ The state of the generator can be modified using set()
+ which makes generator return consecutive fibonacci numbers starting from
+ n
[sup th] fibonacci number.
+
+
boost :: math :: fibonacci_generator < int > gen ;
+int x = gen ();
+int y = gen ();
+for ( int i = 0 ; i < 5 ; ++ i )
+ gen ();
+int z = gen ();
+
+
+ Generator is non-throwing for all fundamental types and will not check for
+ overflows.
+
+
+
+ Type
+ Requirements
+
+
+ The type must be an arithmetic type supporting +, -, * and can be initialized
+ from trivial integral types.
+
+
+
+ Example
+
+
+ The file reciprocal_fibonacci_constant.cpp
+ uses fibonacci_generator
+ to calculate the reciprocal fibonacci constant to 1000 digit precision like
+ so:
+
+
#include < boost / math / special_functions / fibonacci . hpp >
+#include < boost / multiprecision / mpfr . hpp >
+#include < iomanip >
+#include < iostream >
+
+int main () {
+ using Real = boost :: multiprecision :: mpfr_float_1000 ;
+ boost :: math :: fibonacci_generator < Real > gen ;
+ gen . set ( 1 );
+ Real ans = 0 ;
+ const int ITR = 1000 ;
+ for ( int i = 0 ; i < ITR ; ++ i ) {
+ ans += 1.0 / gen ();
+ }
+ std :: cout << std :: setprecision ( 1000 ) << "Reciprocal fibonacci constant after "
+ << ITR << " iterations is: " << ans << std :: endl ;
+}
+
+
+
+ Implementation
+
+
+ The time complexity for computing fibonacci number is O(log n), without considering
+ the time complexities of multiplication and addition (where n
+ is the input parameter). The implementation is iterative version of Dijkstra's identities
+ and which simply walks down the bits of n
.
+
+
+
+ Binet's
+ Formula
+
+
+ There is a closed form expression for computing fibonacci numbers but since
+ it suffers from imprecision issues (using floating point computation), it
+ is not implemented.
+
+
+ However an approximate formula is used for the overflow checking in the checked
+ version.
+
+
+
+
+
+
+
diff --git a/doc/html/math_toolkit/number_series/primes.html b/doc/html/math_toolkit/number_series/primes.html
index 1c9afbf8b2..695bf21283 100644
--- a/doc/html/math_toolkit/number_series/primes.html
+++ b/doc/html/math_toolkit/number_series/primes.html
@@ -7,7 +7,7 @@
-
+