mirror of
https://github.com/boostorg/math.git
synced 2025-05-11 21:33:52 +00:00
Add missing headers and test for git issue
This commit is contained in:
parent
a385ec5a49
commit
fae5c5cd12
@ -13,6 +13,8 @@
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <boost/math/special_functions/gamma.hpp>
|
||||
#include <boost/math/special_functions/expm1.hpp>
|
||||
#include <boost/math/special_functions/detail/hypergeometric_series.hpp>
|
||||
|
||||
namespace boost { namespace math { namespace detail {
|
||||
@ -262,7 +264,7 @@
|
||||
// We have to be careful when one of the b's crosses the origin:
|
||||
//
|
||||
if(bj.size() > BOOST_MATH_PFQ_MAX_B_TERMS)
|
||||
policies::raise_domain_error<Real>("boost::math::hypergeometric_pFq<%1%>(Seq, Seq, %1%)",
|
||||
policies::raise_domain_error<Real>("boost::math::hypergeometric_pFq<%1%>(Seq, Seq, %1%)",
|
||||
"The number of b terms must be less than the value of BOOST_MATH_PFQ_MAX_B_TERMS (" BOOST_STRINGIZE(BOOST_MATH_PFQ_MAX_B_TERMS) "), but got %1%.",
|
||||
Real(bj.size()), pol);
|
||||
|
||||
@ -289,7 +291,7 @@
|
||||
long long loop_scale = 0;
|
||||
//
|
||||
// loop_error_scale will be used to increase the size of the error
|
||||
// estimate (absolute sum), based on the errors inherent in calculating
|
||||
// estimate (absolute sum), based on the errors inherent in calculating
|
||||
// the pochhammer symbols.
|
||||
//
|
||||
Real loop_error_scale = 0;
|
||||
@ -434,7 +436,7 @@
|
||||
// abort this part of the series.
|
||||
//
|
||||
trivial_small_series_check = true;
|
||||
Real d;
|
||||
Real d;
|
||||
if (loop_scale > local_scaling)
|
||||
{
|
||||
long long rescale = local_scaling - loop_scale;
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <boost/math/tools/series.hpp>
|
||||
#include <boost/math/special_functions/gamma.hpp>
|
||||
#include <boost/math/special_functions/trunc.hpp>
|
||||
#include <boost/math/policies/error_handling.hpp>
|
||||
|
||||
|
@ -165,6 +165,7 @@ test-suite special_fun :
|
||||
[ run log1p_expm1_test.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ]
|
||||
[ run powm1_sqrtp1m1_test.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ]
|
||||
[ run git_issue_705.cpp ../../test/build//boost_unit_test_framework ]
|
||||
[ run git_issue_810.cpp ../../test/build//boost_unit_test_framework ]
|
||||
[ run special_functions_test.cpp ../../test/build//boost_unit_test_framework ]
|
||||
[ run test_airy.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ]
|
||||
[ run test_bessel_j.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ]
|
||||
@ -931,7 +932,7 @@ test-suite misc :
|
||||
../../test/build//boost_unit_test_framework
|
||||
: : :
|
||||
<define>TEST_LD=1
|
||||
[ check-target-builds ../config//has_long_double_support "long double support" : : <build>no ]
|
||||
[ check-target-builds ../config//has_long_double_support "long double support" : : <build>no ]
|
||||
:
|
||||
test_tr1_long_double
|
||||
]
|
||||
@ -953,7 +954,7 @@ test-suite misc :
|
||||
../../test/build//boost_unit_test_framework
|
||||
: : :
|
||||
<define>TEST_LD=1
|
||||
[ check-target-builds ../config//has_long_double_support "long double support" : : <build>no ]
|
||||
[ check-target-builds ../config//has_long_double_support "long double support" : : <build>no ]
|
||||
:
|
||||
test_tr1_c_long_double
|
||||
]
|
||||
@ -1282,7 +1283,7 @@ test-suite quadrature :
|
||||
[ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] :
|
||||
tanh_sinh_quadrature_test_9 ]
|
||||
|
||||
[ run tanh_sinh_mpfr.cpp ../tools//mpfr ../tools//gmp : : : [ check-target-builds ../config//has_mpfr : : <build>no ] [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : <build>no ] [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] release <toolset>clang:<cxxflags>-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run tanh_sinh_mpfr.cpp ../tools//mpfr ../tools//gmp : : : [ check-target-builds ../config//has_mpfr : : <build>no ] [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : <build>no ] [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] release <toolset>clang:<cxxflags>-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
[ run sinh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework
|
||||
: : : release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] ]
|
||||
[ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework
|
||||
@ -1444,7 +1445,7 @@ test-suite quadrature :
|
||||
]
|
||||
[ compile compile_test/quad_naive_monte_carlo_incl_test.cpp :
|
||||
[ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_thread cxx11_hdr_atomic cxx11_decltype cxx11_hdr_future cxx11_hdr_chrono cxx11_hdr_random cxx11_allocator ]
|
||||
<target-os>linux:<linkflags>"-pthread" [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ]
|
||||
<target-os>linux:<linkflags>"-pthread" [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ]
|
||||
]
|
||||
|
||||
[ compile compile_test/gauss_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
|
||||
@ -1518,7 +1519,7 @@ test-suite float128_tests : [ get_float128_tests ] ;
|
||||
#
|
||||
# Things that we can test with exceptions and RTTI turned off:
|
||||
#
|
||||
alias no_eh_tests :
|
||||
alias no_eh_tests :
|
||||
compl_abs_incl_test
|
||||
compl_acos_incl_test
|
||||
compl_acosh_incl_test
|
||||
|
26
test/git_issue_810.cpp
Normal file
26
test/git_issue_810.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright Matt Borland, 2022
|
||||
// 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)
|
||||
|
||||
#include "math_unit_test.hpp"
|
||||
#include <iostream>
|
||||
#include <boost/math/special_functions/hypergeometric_pFq.hpp>
|
||||
|
||||
template <typename T>
|
||||
void test()
|
||||
{
|
||||
T z = -9;
|
||||
T h = boost::math::hypergeometric_pFq({2,3,4}, {5,6,7,8}, z); // Calculate 3F4
|
||||
|
||||
// https://www.wolframalpha.com/input?i=HypergeometricPFQ%5B%7B2%2C3%2C4%7D%2C+%7B5%2C6%2C7%2C8%7D%2C-9%5D
|
||||
CHECK_ULP_CLOSE(h, static_cast<T>(0.8821347263567429637736237739975599147079177547846902085909266074L), 2);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
test<double>();
|
||||
test<long double>();
|
||||
|
||||
return boost::math::test::report_errors();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user