Re: table sort: IEEE floating-point number NaN?

Sean Conner <[email protected]> Sat, 25 Apr 2026 05:29:18 -0400
Newsgroups gmane.comp.lang.lua.general
Message-ID <[email protected]>
It was thus said that the Great sur-behoffski once stated:
> (Interesting discussion elided for briefness.)
> 
> Does the floating-point number NaN (assume IEEE754 etc.) always
> compare as false to any other value, even another NaN?

  Yes.  IEEE-754 requires that NaN is not equal to NaN.  You can see this
yourself with Lua:

	Lua 5.4.6  Copyright (C) 1994-2023 Lua.org, PUC-Rio
	> x=0/0
	> print(x,x==x)
	nan	false

  -spc

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/20260425092918.GA1910%40brevard.conman.org.