[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bug in Lua when using signed long
- From: "Alex Davies" <alex.mania@...>
- Date: Sun, 13 Dec 2009 23:13:44 +0800
From: liam mail
So you are saying that a configure script which sets up Lua before
compiling the library and does not
check that types are large enough to pass a standard type and retrieve the
same type is not a bug?
I wouldn't consider it a bug at all. I can say with confidence that the
majority of users would prefer that their lua numbers were doubles then long
doubles - even those running 64 bit. Long doubles take up more space,
increasing the size of the whole Lua union, and are only supported by legacy
x87 (not SSE etc), which ironically isn't supported by x64 (AFAIK). Meaning
all floating point maths would have to be calculated in software. The
majority would prefer to be limited to 53 bits of mantissa then suffer the
above, especially when you consider light_userdata can be used to store
(against Ansi C as Mike Pall's pointed out) 64 bit integers at no increase
in the union size.
It's just one of the catches of using floating point as the only form of
maths.
- Alex