We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2936521 commit 8de0ae6Copy full SHA for 8de0ae6
1 file changed
src/xtd.core/include/xtd/box_floating_point.hpp
@@ -87,7 +87,7 @@ namespace xtd {
87
/// @brief Returns a value indicating whether the specified number evaluates to not a number.
88
/// @param value A floating-point number.
89
/// @return `true` if value evaluates to not a number; otherwise, `false`.
90
- [[nodiscard]] static auto is_NaN(type_t value) noexcept -> bool {return value != value;}
+ [[nodiscard]] static auto is_NaN(type_t value) noexcept -> bool {return std::fpclassify(value) == FP_NAN;}
91
92
/// @brief Returns a value indicating whether the specified number evaluates to negative infinity.
93
0 commit comments