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

5 visningar
Hoppa till det första olästa meddelandet

Gero Peterhoff via Boost-users

oläst,
16 mars 2019 08:08:332019-03-16
till 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

oläst,
16 mars 2019 15:14:152019-03-16
till 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
Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden