Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Headers and Namespaces

All the code in this library is inside namespace boost::math.

In order to use a distribution my_distribution you will need to include either the header <boost/math/my_distribution.hpp> or the "include all the distributions" header: <boost/math/distributions.hpp>.

For example, to use the Students-t distribution include either <boost/math/students_t.hpp> or <boost/math/distributions.hpp>

You also need to bring distribution names into scope, perhaps with a using namespace boost::math; declaration,

or specific using declarations like using boost::math::normal; (recommended).

[Caution] Caution

Some math function names are also used in namespace std so including <random> could cause ambiguity!