File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ run github_issue_426.cpp ;
5050run github_issue_448.cpp ;
5151run-fail github_issue_519.cpp ;
5252run github_issue_799.cpp ;
53+ run github_issue_802.cpp ;
5354run link_1.cpp link_2.cpp link_3.cpp ;
5455run quick.cpp ;
5556run random_decimal32_comp.cpp ;
Original file line number Diff line number Diff line change 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+ void fasting ()
10+ {
11+ using namespace boost ::decimal;
12+ using Dec = decimal128;
13+ const Dec a{100'000 ,1 }; // 6 dec digits significant
14+ const Dec b{2'000'000 ,1 }; // 7 dec digits significant
15+ constexpr Dec ab{2 , 13 };
16+
17+ // Here we should be able to use the fast path instead of the slow path
18+ // since 2e13 fits in a 128 bit uint
19+ BOOST_TEST ((a * b) == ab);
20+ }
21+
22+ int main ()
23+ {
24+ fasting ();
25+
26+ return boost::report_errors ();
27+ }
28+
You can’t perform that action at this time.
0 commit comments