mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Add test set from issue
This commit is contained in:
@@ -173,6 +173,7 @@ test-suite special_fun :
|
||||
[ run git_issue_1006.cpp ]
|
||||
[ run git_issue_184.cpp ]
|
||||
[ run git_issue_1137.cpp ]
|
||||
[ run git_issue_1139.cpp ]
|
||||
[ 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 ]
|
||||
|
||||
25
test/git_issue_1139.cpp
Normal file
25
test/git_issue_1139.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// 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)
|
||||
//
|
||||
// See: https://github.com/boostorg/math/issues/1139
|
||||
|
||||
#include "math_unit_test.hpp"
|
||||
#include <boost/math/tools/rational.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
const double a[] = {1.0, 1.0, 1.0, 1.0, 1.0};
|
||||
const double b[] = {1.0, 1.0, 1.0, 1.0, 1.0};
|
||||
|
||||
double x1 = 1e80;
|
||||
double y1 = boost::math::tools::evaluate_rational(a, b, x1);
|
||||
|
||||
double x2 = -1e80;
|
||||
double y2 = boost::math::tools::evaluate_rational(a, b, x2);
|
||||
|
||||
CHECK_ULP_CLOSE(y1, y2, 1);
|
||||
|
||||
return boost::math::test::report_errors();
|
||||
}
|
||||
Reference in New Issue
Block a user