lua-users home
lua-l archive

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


On Thu, Dec 15, 2011 at 3:56 PM, Daurnimator <quae@daurnimator.com> wrote:

The strange one for me is 0x1p1
... what is p?


These are binary/hex floating point literals, which are part of newer versions of C, as well as Lua 5.2.0.

> =0x1.8p1
3
> =string.format("%a", 77.5)
0x1.36p+6

To be read as (1 + 3/16 + 6/256) * 2^6


 



--