#include #include #include #include using namespace boost::multiprecision; typedef number > quarter_float; int main(int argc, char *argv[]) { for (unsigned int i = 0; i < 16; i++) { unsigned int n = 1 << i; std::cout << "uint: " << n << std::endl; quarter_float qf(n); std::cout << "quarter float: " << qf << std::endl; unsigned int ui_qf = qf.convert_to(); std::cout << "converted to uint: " << ui_qf << std::endl; cpp_int bmi_convert_qf = qf.convert_to(); std::cout << "converted to cpp_int: " << bmi_convert_qf << std::endl; cpp_int bmi_sc_qf = static_cast(qf); std::cout << "static cast to cpp_int: " << bmi_convert_qf << std::endl; double d_qf = qf.convert_to(); std::cout << "converted to double: " << d_qf << std::endl; } }