On 10/02/2022 22:18, Gero Peterhoff via Boost wrote:
Am 10.02.22 um 14:07 schrieb John Maddock via Boost:
On 07/02/2022 19:18, Gero Peterhoff via Boost wrote:
Hello, please see https://godbolt.org/z/Ksshxvhaj
1) std::numeric_limits<__float128>::signaling_NaN always returns 0 but gcc-__builtin_nansq doesn't. I think __builtin_nansq is correct as it is also distinct from std::numeric_limits<__float128>::quiet_NaN (__builtin_nanq). Can you submit a PR please? We would probably need to check for the presence of the intrinsic with __has_intrinsic as I don't *think* it's always been available? Hi John, I can't think of anything besides the sledgehammer method (cast) either, assuming the value of gcc __builtin_nansq is universal.
I'm not sure it's actually supported at all, I see: undefined reference to `nansq' whenever I try to use the builtin, the function nansq appears not to currently exist at all in libquadmath, and isn't declared in current quadmath.h. A quick google yields no hits as well. I wonder if this is still work in progress for gcc? Does anyone have a (non-theoretical) use case for signalling quad-precision NaN's? And or a working test case? Thanks, John. -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus