lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Roberto Ierusalimschy wrote:
> > And, most importantly, canonicalize all NaNs at the ingress points
> > to the VM! For Lua that's only lua_pushnumber, string-to-number
> > conversions and maybe the bytecode loader.
> 
> I unserstand the problem with lua_pushnumber (which copies whatever
> number you give to it), but why can string-to-number conversions
> generate non canonical NaNs?

C99 §7.20.1.3, footnote 253. Some strtod implementations fill the
mantissa with hex digits from "nan(xx...xx)".

--Mike