#include #include typedef boost::multiprecision::number > boost_quadfloat_t; int main(int , char** ) { double x = -0.5; double y = trunc(x); boost_quadfloat_t bx = x; boost_quadfloat_t by = trunc(bx); std::cout << "double: " << "trunc(" << x << ") => " << y << ";\ncpp_bin_float: " << "trunc(" << bx << ") => " << by << "\n" ; return 0; }