1 | #include <iostream>
|
---|
2 | #include <boost/multiprecision/cpp_bin_float.hpp>
|
---|
3 |
|
---|
4 |
|
---|
5 | typedef boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<128, boost::multiprecision::backends::digit_base_2> > ext_float_t;
|
---|
6 |
|
---|
7 | int main(int, char**) {
|
---|
8 | ext_float_t a("1e500000000");
|
---|
9 | ext_float_t b("1e-500000000");
|
---|
10 | ext_float_t ab = a/b;
|
---|
11 | ext_float_t ba = b/a;
|
---|
12 |
|
---|
13 | std::cout
|
---|
14 | << a << " / " << b << " = " << ab << "\n"
|
---|
15 | << b << " / " << a << " = " << ba << "\n"
|
---|
16 | ;
|
---|
17 |
|
---|
18 | return 0;
|
---|
19 | }
|
---|