id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11054,Floating-point comparison of multiprecision values fails if expression template is on,Paul A. Bristow,Raffi Enficiaud,"Floating-point comparison of multiprecision values fails if expression template option is on (which is the default for example with {{{ boost::multiprecision::cpp_bin_float_50; typedef boost::multiprecision::number, boost::multiprecision::et_on> cpp_bin_float_50_et_on; // et_on is default so is same as cpp_bin_float_50.) }}} The error appears inside Boost.test floating_point_comparision.hpp at an apparently impossible place fpc_detail::fpt_abs. The actual problem is in class close_at_tolerance operator() line 204 {{{ FPT diff = fpc_detail::fpt_abs(left - right); }}} in order to allow use of expression templates, it is necessary to cast the variable diff to the FPT explicitly, thus: {{{ FPT diff = fpc_detail::fpt_abs( static_cast(left - right) ); }}} I can provide an explicit test for this, but it seems such a trivial change. This change is vital to allow Boost.Test to be used fully with Boost.Multiprecision. ",Bugs,closed,Boost 1.59.0,test,Boost 1.59.0,Problem,fixed,test multiprecision expression template,raffi.enficiaud@…