Boost logo

Boost :

From: Gero Peterhoff (g.peterhoff_at_[hidden])
Date: 2022-02-21 22:57:46


Hello John,
i tinkered a bit so that std::isnan+std::fpclassify now also work with the value NANS (numeric_limits::signaling_NaN).
For this i used the coming types and functions (stdlib.h). gcc supports this. That's why i don't want to speak directly of a patch, since this still has to be adapted for other compilers. It all boils down to that anyway, so please treat this as a pattern.
The functions returns the same values ​​as the gcc-builtins. However, i cannot say at the moment whether these are actually correct. But i have the feeling that not all of them are correct, since the (bit)schemes differ in part.

adjusted (boost/math/cstdfloat)

cstdfloat_types.hpp:
add BOOST_CSTDFLOAT_FLOAT128_HUGE_VAL

cstdfloat_limits.hpp:
add forward-declarations for nanq/nansq
in numeric_limits:
change has_signaling_NaN to true, correct ?
change infinity
change quiet_NaN
change signaling_NaN

cstdfloat_cmath.hpp:
add in detail:: a lot of functions
change #define BOOST_CSTDFLOAT_FLOAT128_NAN
add #define BOOST_CSTDFLOAT_FLOAT128_NANS
change nanq
add nansq
add in std:: a lot of usings and functions

regards
Gero







Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk