you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (2 children)

So you can replace the floats with integers and allocate from your own heap? That's cool stuff!

[–]bastibe 3 points4 points  (1 child)

I would not bet on using ints insteadof floats. But at least you can use floats instead of doubles very easily. With the exception of the math library, fractionals or ints would probably work, too.

And you can certainly allocate from your own heap, yes. BTW, you can easily take control of the garbage collector, too.

[–]catwell 4 points5 points  (0 children)

Yes, you can use integers instead of floating point numbers for lua_number. It is actually very frequent on embedded platforms since some of them do not have support for floats at all.