From 6effc61ddb1760190daae118dbe5b8534157ef19 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 24 Nov 2025 22:55:57 +0800 Subject: improve math.nan --- xmake/core/base/math.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/core/base/math.lua b/xmake/core/base/math.lua index 82dbdeb38..ce2e1c8b1 100644 --- a/xmake/core/base/math.lua +++ b/xmake/core/base/math.lua @@ -22,7 +22,7 @@ local math = math or {} -- init constants -math.nan = math.log(-1) +math.nan = 0/0 -- use 0/0 instead of math.log(-1) for better cross-platform compatibility (e.g., Solaris) math.e = math.exp(1) math.inf = 1/0 -- @see http://lua-users.org/wiki/InfAndNanComparisons -- cgit v1.3.1