diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp index f3811d919..0f85023be 100644 --- a/include/boost/math/policies/error_handling.hpp +++ b/include/boost/math/policies/error_handling.hpp @@ -211,7 +211,7 @@ BOOST_MATH_GPU_ENABLED inline T raise_domain_error( #else raise_error(function, message, val); // we never get here: - return BOOST_MATH_QUIET_NAN(T); + return boost::math::numeric_limits::quiet_NaN(); #endif } @@ -224,7 +224,7 @@ BOOST_MATH_GPU_ENABLED constexpr T raise_domain_error( { // This may or may not do the right thing, but the user asked for the error // to be ignored so here we go anyway: - return BOOST_MATH_QUIET_NAN(T); + return boost::math::numeric_limits::quiet_NaN(); } template @@ -237,7 +237,7 @@ BOOST_MATH_GPU_ENABLED inline T raise_domain_error( errno = EDOM; // This may or may not do the right thing, but the user asked for the error // to be silent so here we go anyway: - return BOOST_MATH_QUIET_NAN(T); + return boost::math::numeric_limits::quiet_NaN(); } template diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index c03f6170a..152edfa0e 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -683,9 +683,6 @@ namespace boost{ namespace math{ # undef BOOST_MATH_FORCEINLINE # define BOOST_MATH_FORCEINLINE __forceinline__ -// We can't use return std::numeric_limits::quiet_NaN() -# define BOOST_MATH_QUIET_NAN(T) static_cast(NAN); - #elif defined(SYCL_LANGUAGE_VERSION) # define BOOST_MATH_SYCL_ENABLED SYCL_EXTERNAL @@ -706,8 +703,6 @@ namespace boost{ namespace math{ # undef BOOST_MATH_FORCEINLINE # define BOOST_MATH_FORCEINLINE inline -# define BOOST_MATH_QUIET_NAN(T) static_cast(NAN); - #endif #ifndef BOOST_MATH_CUDA_ENABLED @@ -718,10 +713,6 @@ namespace boost{ namespace math{ # define BOOST_MATH_SYCL_ENABLED #endif -#ifndef BOOST_MATH_QUIET_NAN -# define BOOST_MATH_QUIET_NAN(T) std::numeric_limits::quiet_NaN(); -#endif - // Not all functions that allow CUDA allow SYCL (e.g. Recursion is disallowed by SYCL) # define BOOST_MATH_GPU_ENABLED BOOST_MATH_CUDA_ENABLED BOOST_MATH_SYCL_ENABLED