Skip to content

Commit df1439a

Browse files
committed
Add control from builtin floating point
1 parent dc9d611 commit df1439a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/github_issue_1106.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
#include <boost/decimal.hpp>
88
#include <boost/core/lightweight_test.hpp>
99
#include <limits>
10+
#include <cmath>
1011

1112
using namespace boost::decimal;
1213

1314
template <typename T>
1415
void test()
1516
{
17+
using std::isinf;
18+
using std::signbit;
19+
1620
const auto a {std::numeric_limits<T>::lowest() / 99};
17-
const T b {1, 2};
21+
const T b {100};
1822
const auto c {a * b};
1923

2024
BOOST_TEST(isinf(c));
@@ -23,6 +27,9 @@ void test()
2327

2428
int main()
2529
{
30+
test<float>();
31+
test<double>();
32+
2633
test<decimal32_t>();
2734
test<decimal64_t>();
2835
test<decimal128_t>();

0 commit comments

Comments
 (0)