File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ run-fail benchmarks.cpp ;
4545compile-fail concepts_test.cpp ;
4646run github_issue_426.cpp ;
4747run github_issue_448.cpp ;
48+ run github_issue_519.cpp ;
4849run ibm_abs.cpp ;
4950run ibm_add.cpp ;
5051run link_1.cpp link_2.cpp link_3.cpp ;
Original file line number Diff line number Diff line change 1+ // Copyright 2024 Matt Borland
2+ // Copyright 2024 Christopher Kormanyos
3+ // Distributed under the Boost Software License, Version 1.0.
4+ // https://www.boost.org/LICENSE_1_0.txt
5+
6+ #include < boost/decimal.hpp>
7+
8+ #include < iomanip>
9+ #include < iostream>
10+ #include < limits>
11+ #include < sstream>
12+
13+ auto main () -> int
14+ {
15+ using local_decimal_type = boost::decimal::decimal128;
16+
17+ // N[Gamma[456/100], 34]
18+ // 12.64819265438397922113369900828315
19+ //
20+ // For Decimal 128:
21+ // 4.56
22+ // 12.64819265438397922113369900828314
23+
24+ const local_decimal_type x = local_decimal_type { 456 , -2 };
25+
26+ const auto tg = tgamma (x);
27+
28+ {
29+ std::stringstream strm;
30+
31+ strm << std::setprecision (std::numeric_limits<local_decimal_type>::digits10) << x;
32+
33+ std::cout << strm.str () << std::endl;
34+ }
35+
36+ {
37+ std::stringstream strm;
38+
39+ strm << std::setprecision (std::numeric_limits<local_decimal_type>::digits10) << tg;
40+
41+ std::cout << strm.str () << std::endl;
42+ }
43+
44+ return 1 ;
45+ }
You can’t perform that action at this time.
0 commit comments