From 08363ebde24c58d0a8ea69f42ee6d72dd67e1c56 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 14 Dec 2020 09:30:33 +0000 Subject: [PATCH] Core: double NAN and INF are now IsNull git-svn-id: svn://ultimatepp.org/upp/trunk@15592 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uppsrc/Core/Defs.h b/uppsrc/Core/Defs.h index 4b03df0a0..a31cdd18c 100644 --- a/uppsrc/Core/Defs.h +++ b/uppsrc/Core/Defs.h @@ -278,7 +278,7 @@ template bool IsNull(const T& x) { return x.IsNullInstance(); } template<> inline bool IsNull(const int& i) { return i == INT_NULL; } template<> inline bool IsNull(const int64& i) { return i == INT64_NULL; } -template<> inline bool IsNull(const double& r) { return r < DOUBLE_NULL_LIM; } +template<> inline bool IsNull(const double& r) { return !(abs(r) < -DOUBLE_NULL); } template<> inline bool IsNull(const bool& r ) { return false; } #include "Heap.h"