libboost-math/1.77.0+1

[brief]

Boost.Math includes several contributions in the domain of mathematics: The Greatest Common Divisor and Least Common Multiple library provides run-time and compile-time evaluation of the greatest common divisor (GCD) or least common multiple (LCM) of two integers. The Special Functions library currently provides eight templated special functions, in namespace boost. The Complex Number Inverse Trigonometric Functions are the inverses of trigonometric functions currently present in the C++ standard. Quaternions are a relative of complex numbers often used to parameterise rotations in three dimentional space. Octonions, like quaternions, are a relative of complex numbers

ANNOUNCEMENT: Support for C++03 is now deprecated in this library and will be supported in existing features only until March 2021. New features will require at least C++11, as will existing features from next year.

This library is divided into several interconnected parts:

Floating Point Utilities

Utility functions for dealing with floating point arithmetic, includes functions for floating point classification (fpclassify, isnan, isinf etc), sign manipulation, rounding, comparison, and computing the distance between floating point numbers.

Specific Width Floating Point Types

A set of typedefs similar to those provided by <cstdint> but for floating point types.

Mathematical Constants

A wide range of constants ranging from various multiples of π, fractions, Euler's constant, etc.

These are of course usable from template code, or as non-templates with a simplified interface if that is more appropriate.

Statistical Distributions

Provides a reasonably comprehensive set of statistical distributions, upon which higher level statistical tests can be built.

The initial focus is on the central univariate distributions. Both continuous (like normal & Fisher) and discrete (like binomial & Poisson) distributions are provided.

A comprehensive tutorial is provided, along with a series of worked examples illustrating how the library is used to conduct statistical tests.

Special Functions

Provides a small number of high quality special functions; initially these were concentrated on functions used in statistical applications along with those in the Technical Report on C++ Library Extensions.

The function families currently implemented are the gamma, beta & error functions along with the incomplete gamma and beta functions (four variants of each) and all the possible inverses of these, plus the digamma, various factorial functions, Bessel functions, elliptic integrals, hypergeometrics, sinus cardinals (along with their hyperbolic variants), inverse hyperbolic functions, Legrendre/Laguerre/Hermite/Chebyshev polynomials and various special power and logarithmic functions.

All the implementations are fully generic and support the use of arbitrary "real-number" types, including Boost.Multiprecision, although they are optimised for use with types with known significand (or mantissa) sizes: typically float, double or long double.

These functions also provide the basis of support for the TR1 special functions.

Root Finding and Function Minimisation

A comprehensive set of root-finding algorithms over the real line, both with derivatives and derivative free.

Also function minimisation via Brent's Method.

Polynomials and Rational Functions

Tools for manipulating polynomials and for efficient evaluation of rationals or polynomials.

Interpolation

Function interpolation via barycentric rational interpolation, compactly supported quadratic, cubic, and quintic B-splines, the Chebyshev transform, trigonometric polynomials, Makima, pchip, cubic Hermite splines, and bilinear interpolation.

Numerical Integration and Differentiation

A reasonably comprehensive set of routines for integration (trapezoidal, Gauss-Legendre, Gauss-Kronrod, Gauss-Chebyshev, double-exponential, and Monte-Carlo) and differentiation (Chebyshev transform, finite difference, the complex step derivative, and forward-mode automatic differentiation).

The integration routines are usable for functions returning complex results - and hence can be used for computation of contour integrals.

Quaternions and Octonions

Quaternion and Octonians are class templates similar to std::complex.

The full documentation is available on boost.org.

Standalone Mode (Beta)

Defining BOOST_MATH_STANDALONE allows Boost.Math to be used without any Boost dependencies. Some functionality is reduced in this mode. A static_assert message will alert you if a particular feature has been disabled by standalone mode.

Supported Compilers

The following compilers are tested with the CI system, and are known to work. Starting with Boost 1.76 (April 2021 Release) a compiler that is fully compliant with C++11 is required to use Boost.Math.

Build Status

Master Develop
Github Actions Build Status Build Status
Drone Build Status Build Status

Support, bugs and feature requests

Bugs and feature requests can be reported through the GitHub issue tracker (see open issues and closed issues).

You can submit your changes through a pull request.

There is no mailing-list specific to Boost Math, although you can use the general-purpose Boost mailing-list using the tag [math].

Development

Clone the whole boost project, which includes the individual Boost projects as submodules (see boost+git doc):

$ git clone https://github.com/boostorg/boost
$ cd boost
$ git submodule update --init

The Boost Math Library is located in libs/math/.

Running tests

First, make sure you are in libs/math/test. You can either run all the tests listed in Jamfile.v2 or run a single test:

test$ ../../../b2                        <- run all tests
test$ ../../../b2 static_assert_test     <- single test
test$ # A more advanced syntax, demoing various options for building the tests:
test$ ../../../b2 -a -j2 -q --reconfigure toolset=clang cxxflags="--std=c++14 -fsanitize=address -fsanitize=undefined" linkflags="-fsanitize=undefined -fsanitize=address"

Continuous Integration

The default action for a PR or commit to a PR is for CI to run the full complement of tests. The following can be appended to the end of a commit message to modify behavior:

* [ci skip] to skip all tests
* [linux] to test using GCC Versions 5-10 and Clang Versions 5-10 on Ubuntu LTS versions 16.04-20.04.
* [apple] to test Apple Clang on the latest version of MacOS.
* [windows] to test MSVC-14.0, MSVC-14.2 and mingw on the latest version of Windows.
* [standalone] to run standalone mode compile tests

Building documentation

Full instructions can be found here, but to reiterate slightly:

libs/math/doc$ brew install docbook-xsl # on mac
libs/math/doc$ touch ~/user-config.jam
libs/math/doc$ # now edit so that:
libs/math/doc$ cat ~/user-config.jam
using darwin ;

using xsltproc ;

using boostbook
    : /usr/local/opt/docbook-xsl/docbook-xsl
    ;

using doxygen ;
using quickbook ;
libs/math/doc$ ../../../b2
version 1.77.0+1
license BSL-1.0Boost Software License 1.0
repository https://pkg.cppget.org/1/stable
download libboost-math-1.77.0+1.tar.gz
sha256 a02c0faba7f1b8817bb1b06268b56da6082634126cc06cc1f05b34cf49e05c04
project boost
url github.com/boostorg/math
doc-url www.boost.org/doc/libs/1_77_0/libs/math
package-url github.com/build2-packaging/boost
package-email packaging@build2.orgMailing list
topics C++Boost

Depends (10)

libboost-assert == 1.77.0
libboost-concept-check == 1.77.0
libboost-config == 1.77.0
libboost-core == 1.77.0
libboost-integer == 1.77.0
libboost-lexical-cast == 1.77.0
libboost-predef == 1.77.0
libboost-random == 1.77.0
libboost-static-assert == 1.77.0
libboost-throw-exception == 1.77.0

Builds

toolchain public-0.16.0
target x86_64-freebsd13.2
tgt config freebsd_13-clang_14.0-O3
timestamp 2024-03-28 11:26:58 UTC (10:09 minutes ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-freebsd12.4
tgt config freebsd_12-clang_13.0
timestamp 2024-03-28 11:17:56 UTC (19:11 minutes ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_fedora_37-gcc_12.2-bindist
timestamp 2024-03-28 08:39:28 UTC (02:57:39 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_fedora_38-gcc_13-bindist
timestamp 2024-03-28 06:31:02 UTC (05:06:05 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16_libc++-O3
timestamp 2024-03-28 05:11:56 UTC (06:25:11 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16_libc++
timestamp 2024-03-28 05:04:59 UTC (06:32:08 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16-O3
timestamp 2024-03-28 05:01:19 UTC (06:35:48 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16_libc++-static_O3
timestamp 2024-03-28 04:55:43 UTC (06:41:24 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16
timestamp 2024-03-28 04:54:31 UTC (06:42:36 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_16-static_O3
timestamp 2024-03-28 04:50:37 UTC (06:46:30 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-w64-mingw32
tgt config windows_10-gcc_12.2_mingw_w64
timestamp 2024-03-27 13:58:50 UTC (21:38:17 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_15_libc++
timestamp 2024-03-27 13:43:42 UTC (21:53:25 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-clang_15
timestamp 2024-03-27 13:43:09 UTC (21:53:58 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-w64-mingw32
tgt config windows_10-gcc_12.2_mingw_w64-O2
timestamp 2024-03-27 13:42:11 UTC (21:54:56 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-w64-mingw32
tgt config windows_10-gcc_12.2_mingw_w64-static_O2
timestamp 2024-03-27 13:40:41 UTC (21:56:26 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_12-bindist
timestamp 2024-03-27 13:38:57 UTC (21:58:10 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_13.1-ndebug_O3
timestamp 2024-03-27 13:33:53 UTC (22:03:14 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_13.1
timestamp 2024-03-27 13:33:29 UTC (22:03:38 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_13.1-O3
timestamp 2024-03-27 13:32:52 UTC (22:04:15 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_11-gcc_12
timestamp 2024-03-27 13:31:11 UTC (22:05:56 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-gcc_13.1-static_O3
timestamp 2024-03-27 13:30:51 UTC (22:06:16 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.6
timestamp 2024-03-27 13:23:00 UTC (22:14:07 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.6-O2
timestamp 2024-03-27 13:22:19 UTC (22:14:48 hours ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0_libc++-O3
timestamp 2024-03-26 14:34:15 UTC (01 21:02:52 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.6-static_O2
timestamp 2024-03-26 14:15:19 UTC (01 21:21:48 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0-O3
timestamp 2024-03-26 14:01:08 UTC (01 21:35:59 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0_libc++
timestamp 2024-03-26 14:00:40 UTC (01 21:36:27 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0_libc++-static_O3
timestamp 2024-03-26 09:46:34 UTC (02 01:50:33 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0
timestamp 2024-03-26 09:45:40 UTC (02 01:51:27 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_16.0_llvm_msvc_17.6-O2
timestamp 2024-03-26 09:39:26 UTC (02 01:57:41 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_16.0-static_O3
timestamp 2024-03-26 09:35:03 UTC (02 02:02:04 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_16.0_llvm_msvc_17.6
timestamp 2024-03-26 09:20:55 UTC (02 02:16:12 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_16.0_llvm_msvc_17.6-static_O2
timestamp 2024-03-26 09:04:55 UTC (02 02:32:13 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-clang_15.0_msvc_msvc_17.6
timestamp 2024-03-26 08:02:14 UTC (02 03:34:53 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-microsoft-win32-msvc14.3
tgt config windows_10-msvc_17.5
timestamp 2024-03-26 07:45:38 UTC (02 03:51:29 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_15.0_libc++
timestamp 2024-03-26 07:22:01 UTC (02 04:15:06 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-freebsd13.2
tgt config freebsd_13-clang_14.0-static_O3
timestamp 2024-03-26 07:16:29 UTC (02 04:20:38 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_12-clang_15.0
timestamp 2024-03-26 07:04:03 UTC (02 04:33:04 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-linux-gnu
tgt config linux_debian_11-gcc_12.1
timestamp 2024-03-26 06:49:49 UTC (02 04:47:18 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-freebsd13.2
tgt config freebsd_13-clang_14.0
timestamp 2024-03-26 04:54:07 UTC (02 06:43:01 days ago)
result success | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_14.0-static_O3
timestamp 2024-03-25 21:11:14 UTC (02 14:25:54 days ago)
result warning (update) | warning (test-installed) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_14.0-O3
timestamp 2024-03-25 21:06:48 UTC (02 14:30:19 days ago)
result warning (update) | warning (test-installed) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_14.0
timestamp 2024-03-25 21:01:02 UTC (02 14:36:05 days ago)
result warning (update) | warning (test-installed) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_15.0-static_O3
timestamp 2024-03-25 20:43:10 UTC (02 14:53:57 days ago)
result warning (update) | warning (test-installed) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_15.0-O3
timestamp 2024-03-25 20:36:33 UTC (02 15:00:34 days ago)
result warning (update) | warning (test-installed) | log | rebuild
toolchain public-0.16.0
target x86_64-apple-darwin22.5.0
tgt config macos_13-clang_15.0
timestamp 2024-03-25 20:30:30 UTC (02 15:06:37 days ago)
result warning (update) | warning (test-installed) | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_13-ndebug_O3
timestamp 2024-03-25 18:31:27 UTC (02 17:05:40 days ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_13-O3
timestamp 2024-03-25 18:30:19 UTC (02 17:06:48 days ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_13
timestamp 2024-03-25 18:29:47 UTC (02 17:07:20 days ago)
result success | log | rebuild
toolchain public-0.16.0
target aarch64-linux-gnu
tgt config linux_debian_12-gcc_13-static_O3
timestamp 2024-03-25 18:29:16 UTC (02 17:07:51 days ago)
result success | log | rebuild
target x86_64-apple-darwin22.5.0
tgt config macos_13-gcc_13_homebrew
result excluded (https://github)
target x86_64-apple-darwin22.5.0
tgt config macos_13-gcc_13_homebrew-O3
result excluded (https://github)
target x86_64-apple-darwin22.5.0
tgt config macos_13-gcc_13_homebrew-static_O3
result excluded (https://github)