[Boost-users] numeric_limits<float128_t> return incorrect values

2 views
Skip to first unread message

Gero Peterhoff via Boost-users

unread,
Mar 16, 2019, 8:08:33 AM3/16/19
to John Maddock via Boost-users, Gero Peterhoff
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

thx
Gero
pEpkey.asc

Paul A. Bristow via Boost-users

unread,
Mar 16, 2019, 3:14:15 PM3/16/19
to boost...@lists.boost.org, Paul A. Bristow
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







_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply all
Reply to author
Forward
0 new messages