Simple integer library

I would like to have a simple integer library to do bit bashing. It would be useful for scada work, encryption, low level encoding/decoding internet packets and better random number generators. Basically all I need is a library with calls which converts Lua’s floating point numbers to integers (32 bit signed or unsigned), performs the operation and returns the result as a float (a double) - not efficient but workable for most situations. I realize that it is impractical to natively implement an integer data type if you want to track the official Lua release.

So the library would need to support signed and unsigned +, -, *, /, mod, >>, <
Now I am sure your hands are full. I have been using Lua for a couple of years now integrated with C & Delphi. I would be happy to put together such a library in C and hand it over to you using whatever open source license you would like to integrate it into Corona.

Interested? [import]uid: 1813 topic_id: 323 reply_id: 300323[/import]

What are your thoughts about existing bit library implementations? http://lua-users.org/wiki/BitwiseOperators [import]uid: 5 topic_id: 323 reply_id: 499[/import]

Lua BitOp looks really good - very consistent, complete and well documented. I used one of the Lua patch versions because it blends naturally in with Lua without having to do explicit library calls. My assumption was that you would not want to go there seeing it modifies the parser and VM. [import]uid: 1813 topic_id: 323 reply_id: 500[/import]