// (C) Copyright John Maddock 2022. // (C) Copyright Matt Borland 2024. // Use, modification and distribution are subject to 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) module; #define BOOST_MATH_SF_AS_MODULE #define BOOST_MATH_AS_MODULE #define BOOST_MATH_STANDALONE #if defined(__cpp_lib_modules) && __cpp_lib_modules >= 202207L import std; import std.compat; #else #include #include #include #include #include #include #include #include #include #include #include #endif #include export module boost.math.special_functions; import boost.math.core; import boost.math.constants; // // Forward declarations in math_fwd.hpp are not available, so forward declare what we need to first: // export namespace boost::math { template struct max_factorial; template RT factorial(unsigned int); template RT factorial(unsigned int, const Policy& pol); template RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT)); template RT double_factorial(unsigned i); template RT double_factorial(unsigned i, const Policy& pol); template typename tools::promote_args::type falling_factorial(RT x, unsigned n); template typename tools::promote_args::type falling_factorial(RT x, unsigned n, const Policy& pol); template typename tools::promote_args::type rising_factorial(RT x, int n); template typename tools::promote_args::type rising_factorial(RT x, int n, const Policy& pol); // Gamma functions. template typename tools::promote_args::type tgamma(RT z); template typename tools::promote_args::type tgamma1pm1(RT z); template typename tools::promote_args::type tgamma1pm1(RT z, const Policy& pol); template typename tools::promote_args::type tgamma(RT1 a, RT2 z); template typename tools::promote_args::type tgamma(RT1 a, RT2 z, const Policy& pol); template typename tools::promote_args::type lgamma(RT z, int* sign); template typename tools::promote_args::type lgamma(RT z, int* sign, const Policy& pol); template typename tools::promote_args::type lgamma(RT x); template typename tools::promote_args::type lgamma(RT x, const Policy& pol); template typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z); template typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z, const Policy&); template typename tools::promote_args::type gamma_q(RT1 a, RT2 z); template typename tools::promote_args::type gamma_q(RT1 a, RT2 z, const Policy&); template typename tools::promote_args::type gamma_p(RT1 a, RT2 z); template typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta); template typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&); template typename tools::promote_args::type tgamma_ratio(T1 a, T2 b); template typename tools::promote_args::type tgamma_ratio(T1 a, T2 b, const Policy&); template typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x); template typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x, const Policy&); // gamma inverse. template typename tools::promote_args::type gamma_p_inv(T1 a, T2 p); template typename tools::promote_args::type gamma_p_inva(T1 a, T2 p, const Policy&); template typename tools::promote_args::type gamma_p_inva(T1 a, T2 p); template typename tools::promote_args::type gamma_p_inv(T1 a, T2 p, const Policy&); template typename tools::promote_args::type gamma_q_inv(T1 a, T2 q); template typename tools::promote_args::type gamma_q_inv(T1 a, T2 q, const Policy&); template typename tools::promote_args::type gamma_q_inva(T1 a, T2 q); template typename tools::promote_args::type gamma_q_inva(T1 a, T2 q, const Policy&); // digamma: template typename tools::promote_args::type digamma(T x); template typename tools::promote_args::type digamma(T x, const Policy&); // trigamma: template typename tools::promote_args::type trigamma(T x); template typename tools::promote_args::type trigamma(T x, const Policy&); // polygamma: template typename tools::promote_args::type polygamma(int n, T x); template typename tools::promote_args::type polygamma(int n, T x, const Policy&); // erf & erfc error functions. template // Error function. typename tools::promote_args::type erf(RT z); template // Error function. typename tools::promote_args::type erf(RT z, const Policy&); template // Error function complement. typename tools::promote_args::type erfc(RT z); template // Error function complement. typename tools::promote_args::type erfc(RT z, const Policy&); template // Error function inverse. typename tools::promote_args::type erf_inv(RT z); template // Error function inverse. typename tools::promote_args::type erf_inv(RT z, const Policy& pol); template // Error function complement inverse. typename tools::promote_args::type erfc_inv(RT z); template // Error function complement inverse. typename tools::promote_args::type erfc_inv(RT z, const Policy& pol); // Zeta: template typename tools::promote_args::type zeta(T s, const Policy&); } #include #include #include #include #include #include #include