lua-users home
lua-l archive

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


"Mike Crowe" <drmikecrowe@gmail.com> writes:

> Hi folks,
>
> This has been driving me nuts, but I just drilled down to find what was wrong.
>
> I'm using lua on an embedded ARM device, and everything worked great until I
> added a 3rd party library which didn't work.  I should point out that all the
> development on the PC worked fine, and it took a lot of work to find this:
>
> The problem seems to be with using literal numbers.  If I do:
>
> i = 1
>
> and then log what I is, I get:
>
> = 5.2998088236266e-315
>
> Has anybody ever seen anything like this?  I'm sure it's something in
> how we included lua in the system, somehow, would appreciate any
> feedback.

That's likely what happens if you interpret a memory location containing
a native integer (which Lua does not have) as a floating point number
(the default number type for Lua).

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum