Skip to content

Commit 1ec7769

Browse files
committed
Add reproducer issue
1 parent 437d912 commit 1ec7769

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

test/Jamfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ run github_issue_448.cpp ;
5151
run-fail github_issue_519.cpp ;
5252
run github_issue_799.cpp ;
5353
run github_issue_802.cpp ;
54+
run github_issue_805.cpp ;
5455
run link_1.cpp link_2.cpp link_3.cpp ;
5556
run quick.cpp ;
5657
run random_decimal32_comp.cpp ;

test/github_issue_805.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright 2025 Matt Borland
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// https://www.boost.org/LICENSE_1_0.txt
4+
5+
#include <boost/decimal.hpp>
6+
#include <boost/core/lightweight_test.hpp>
7+
#include <iostream>
8+
9+
using namespace boost::decimal;
10+
11+
template <typename Dec>
12+
void test()
13+
{
14+
Dec a(2, std::numeric_limits<Dec>::max_exponent10);
15+
Dec b = scalbln(a, 10);
16+
17+
BOOST_TEST(isinf(b));
18+
}
19+
20+
int main()
21+
{
22+
test<decimal32>();
23+
test<decimal64>();
24+
test<decimal128>();
25+
test<decimal32_fast>();
26+
test<decimal64_fast>();
27+
test<decimal128_fast>();
28+
29+
return boost::report_errors();
30+
}
31+

0 commit comments

Comments
 (0)