Precision rounding problem with boost multiprecision

I want to multiply number 123456789.123456789 by 1000000000.0 and as a result of this operation I expect 123456789123456789 as int or float 123456789123456789.0, but I got: res: 123456789123456791.04328155517578125 int_res: 123456789123456791 Should I do it in other way ? #include <iostream> #include <boost/multiprecision/cpp_int.hpp> #include <boost/multiprecision/cpp_dec_float.hpp> namespace bmp = boost::multiprecision; int main() { bmp::cpp_dec_float_100 scalar{1000000000.0}; bmp::cpp_dec_float_100 a{123456789.123456789};… Read More Precision rounding problem with boost multiprecision