lua-users home
lua-l archive

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


> > The Lua 5.2 change document makes a suggestion that Lua 5.2 has "support for hexadecimal floats."
> > 
> >      local ok, v = pcall(string.format," --[[ 0x%x ]]",5.5)
> 
> Try %a instead of 0x%x. Try also
> 
> 	a=0x1.6p+2 ; print(a)

As a side note, rc4 changed back this error, so %x accepts 5.5 as
argument (behaving as 5.1 did). Note that %x (and %d, etc.) still
complain if the number is out of range.

-- Roberto