
25 Jan
2012
25 Jan
'12
10:10 p.m.
John, It took me some time to figure out that convert_to<double>() method doesn't work properly for negative integers (Please correct me if I'm wrong). Here is the code snippet: #include "boost/multiprecision/fixed_int.hpp" using namespace boost::multiprecision; int main() { mp_int512_t a = 1; double da = a.convert_to<double>(); mp_int512_t b = -1; double db = b.convert_to<double>(); std::cout << da << std::endl; // Outputs: 1 std::cout << db << std::endl; // Outputs: 1.34078e+154 return 0; } As soon as this fix is ready, I'll be able to finish benchmark. Regards, Andrii