// // boost_multiprecision_power_demo.cpp // // Created by Jan Bouwer on 9/7/13. #include #include #include #include template void test_power_float(double e) { const T xb(-1), xe(e); assert( xe > 0 ); std::cout << "pow(-1, " << e << ") = " << pow(xb, xe) << std::endl; } void test_boost_mp() { using namespace boost::multiprecision; test_power_float(0x8000000000000000u); test_power_float(0x8000000000000001u); test_power_float(0xFFFFFFFFFFFFFFFEu); test_power_float(0xFFFFFFFFFFFFFFFFu); test_power_float(0x8000000000000000u); test_power_float(0x8000000000000001u); test_power_float(0xFFFFFFFFFFFFFFFEu); test_power_float(0xFFFFFFFFFFFFFFFFu); }