| 1 | #include <iostream>
|
|---|
| 2 | #include <cmath>
|
|---|
| 3 | #include <boost/cast.hpp>
|
|---|
| 4 | #include <boost/integer.hpp>
|
|---|
| 5 |
|
|---|
| 6 | using namespace std;
|
|---|
| 7 | int main() {
|
|---|
| 8 | try {
|
|---|
| 9 | cout << boost::numeric_cast<int64_t>((float)ldexp(-1,63));
|
|---|
| 10 | } catch(boost::bad_numeric_cast &e) {
|
|---|
| 11 | cout << e.what();
|
|---|
| 12 | }
|
|---|
| 13 | }
|
|---|