Added thirdparty: boost library

This commit is contained in:
Viacheslav Demydiuk
2024-01-06 19:55:56 +02:00
parent bf49f439e1
commit bccd1e7051
15683 changed files with 3239840 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
// Copyright 2022 Hans Dembinski, Jay Gohil
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_HISTOGRAM_DETAIL_NORMAL_HPP
#define BOOST_HISTOGRAM_DETAIL_NORMAL_HPP
#include <boost/histogram/detail/erf_inv.hpp>
#include <cmath>
namespace boost {
namespace histogram {
namespace detail {
inline double normal_cdf(double x) noexcept {
return std::fma(0.5, std::erf(x / std::sqrt(2)), 0.5);
}
inline double normal_ppf(double p) noexcept {
return std::sqrt(2) * erf_inv(2 * (p - 0.5));
}
} // namespace detail
} // namespace histogram
} // namespace boost
#endif