-----Original Message----- From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Gero Peterhoff via Boost-users Sent: 16 March 2019 12:03 To: John Maddock via Boost-users Cc: Gero Peterhoff Subject: [Boost-users] numeric_limits
return incorrect values Hello, your implementation in /boost/math/cstdfloat/cstdfloat_limits.hpp return incorrect values for: - has_denorm - denorm_min - is_bounded - signaling/quiet_NaN ? Are the other values correct? See https://github.com/gcc-mirror/gcc/blob/master/libquadmath/quadmath.h
I'm getting (using GCC 8.1.0 via Codeblocks ) for example: std::cout <<" std::numeric_limits<float128>::has_denorm = " << static_cast<bool>(std::numeric_limits<float128>::has_denorm) << std::endl; if(std::numeric_limits<float128>::has_denorm == true) { std::cout <<" std::numeric_limits<float128>::denorm_min() = " << std::numeric_limits<float128>::denorm_min() << std::endl; std::cout << "FLT128_DENORM_MIN = " << FLT128_DENORM_MIN << std::endl; } std::numeric_limits<float128>::has_denorm = 1 std::numeric_limits<float128>::denorm_min() = 6.47517511943802511092443895822764655e-4966 FLT128_DENORM_MIN = 6.47517511943802511092443895822764655e-4966 and some others that look OK too. std::numeric_limits<float128>::min() = 3.36210314311209350626267781732175260e-4932 std::numeric_limits<float128>::epsilon() = 1.92592994438723585305597794258492732e-34 std::numeric_limits<float128>::is_bounded() = false std::numeric_limits<float128>::quiet_NaN() = nan So can you tell us how/where are you getting the wrong answers? Paul