1 | #include <iostream>
|
---|
2 | #include <boost/multiprecision/cpp_dec_float.hpp>
|
---|
3 |
|
---|
4 | int main()
|
---|
5 | {
|
---|
6 | typedef boost::multiprecision::number<boost::multiprecision::cpp_dec_float<50>,
|
---|
7 | boost::multiprecision::et_on>
|
---|
8 | cpp_dec_float_50_et_on;
|
---|
9 |
|
---|
10 | typedef boost::multiprecision::number<boost::multiprecision::cpp_dec_float<50>,
|
---|
11 | boost::multiprecision::et_off>
|
---|
12 | cpp_dec_float_50_et_off;
|
---|
13 |
|
---|
14 | cpp_dec_float_50_et_on x_et_on = 2;
|
---|
15 | cpp_dec_float_50_et_off x_et_off = 2;
|
---|
16 |
|
---|
17 | int exponent_et_on;
|
---|
18 | int exponent_et_off;
|
---|
19 |
|
---|
20 | frexp(x_et_on, &exponent_et_on);
|
---|
21 | std::cout << "x_et_on = " << x_et_on << ", exponent_et_on = " << exponent_et_on << std::endl;
|
---|
22 |
|
---|
23 | frexp(x_et_off, &exponent_et_off);
|
---|
24 | std::cout << "x_et_off = " << x_et_off << ", exponent_et_off = " << exponent_et_off << std::endl;
|
---|
25 |
|
---|
26 | frexp(x_et_on, &exponent_et_on);
|
---|
27 | std::cout << "x_et_on = " << x_et_on << ", exponent_et_on = " << exponent_et_on << std::endl;
|
---|
28 | }
|
---|