id summary reporter owner description type status milestone component version severity resolution keywords cc 5758 Boost.Test Floating-point comparison diagnostic output does not support radix 10 Paul A. Bristow Gennadiy Rozental "Boost.Test Floating-point comparison diagnostic output does not support radix 10. This emerged as a problem writing tests for Christopher Kormanyos proposed e_float extended precision float library which uses radix 10. Tests that fail do not provide sufficient decimal digits to reveal why the test fails. Numeric_limits is properly specialized for e_float, so max_digits10 is valid (and this is also true for a recent fixed decimal library. So I suggest that in test_tools.hpp function set_precision After dealing with the radix = 2 case, (and noting that although we would like to rely on max_digits10, older compilers/libraries do not provide it, and the recent MS VC10 wrongly implements float max_digits10 as 8 instead of 9, it is safer to continue to use the original Kahan formula)> // Ideally should use max_digits10 if available, and correct! But this always works. if( std::numeric_limits::is_specialized && std::numeric_limits::radix Add new code to deal with the radix=10 case (but in this case '''we can rely on max_digits10''') // If radix = 10, is recent code so assume max_digits10 should be correct. // For example, e_float and a fixed decimal package(s) both comply. if( std::numeric_limits::is_specialized && std::numeric_limits::radix == 10 ) ostr.precision( std::numeric_limits::max_digits10 ); (Might also be worth a comment that for other cases, precision will remain at the default value, whatever that is). This has been tested and works as expected for e_float. " Support Requests closed Boost 1.51.0 test Boost Development Trunk Problem fixed floating point radix 10 decimal precision