| 1 |
|
|---|
| 2 | #include <iostream>
|
|---|
| 3 | #include <boost/multiprecision/cpp_int.hpp>
|
|---|
| 4 | #include <boost/version.hpp>
|
|---|
| 5 |
|
|---|
| 6 | using u256 = boost::multiprecision::number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>;
|
|---|
| 7 |
|
|---|
| 8 | int main()
|
|---|
| 9 | {
|
|---|
| 10 | std::cout << "Boost " << BOOST_VERSION << std::endl;
|
|---|
| 11 | u256 a{"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBA"};
|
|---|
| 12 | u256 b{"0x1DAE6076B981DAE6076B981DAE6076B981DAE6076B981DAE6076B981DAE6077"};
|
|---|
| 13 | auto c = a / b;
|
|---|
| 14 | std::cout << c << std::endl;
|
|---|
| 15 | return 0;
|
|---|
| 16 | }
|
|---|