mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
@@ -212,7 +212,10 @@ namespace boost
|
||||
}
|
||||
pois *= i / l2;
|
||||
beta -= xterm;
|
||||
xterm *= (a + i - 1) / (x * (a + b + i - 2));
|
||||
if (a + b + i - 2 != 0)
|
||||
{
|
||||
xterm *= (a + i - 1) / (x * (a + b + i - 2));
|
||||
}
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
@@ -896,6 +896,7 @@ test-suite distribution_tests :
|
||||
[ run git_issue_800.cpp ../../test/build//boost_unit_test_framework ]
|
||||
[ run git_issue_845.cpp ../../test/build//boost_unit_test_framework ]
|
||||
[ run scipy_issue_14901.cpp ../../test/build//boost_unit_test_framework ]
|
||||
[ run scipy_issue_14901_ncf.cpp ../../test/build//boost_unit_test_framework ]
|
||||
[ run scipy_issue_15101.cpp ../../test/build//boost_unit_test_framework ]
|
||||
[ run scipy_issue_17146.cpp ../../test/build//boost_unit_test_framework ]
|
||||
[ run scipy_issue_17388.cpp ../../test/build//boost_unit_test_framework ]
|
||||
|
||||
27
test/scipy_issue_14901_ncf.cpp
Normal file
27
test/scipy_issue_14901_ncf.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright Matt Borland, 2023
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See: https://github.com/scipy/scipy/issues/14901
|
||||
|
||||
#include <cfenv>
|
||||
#include <boost/math/distributions/non_central_f.hpp>
|
||||
#include "math_unit_test.hpp"
|
||||
|
||||
#pragma STDC FENV_ACCESS ON
|
||||
|
||||
int main()
|
||||
{
|
||||
auto ncf1 = boost::math::non_central_f(1, 1, 1);
|
||||
const auto cdf1 = boost::math::cdf(ncf1, 2);
|
||||
|
||||
CHECK_ULP_CLOSE(cdf1, 1 - 0.5230393170884924, 20);
|
||||
|
||||
if (std::fetestexcept(FE_INVALID) || std::fetestexcept(FE_DIVBYZERO))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return boost::math::test::report_errors();
|
||||
}
|
||||
Reference in New Issue
Block a user