lua-users home
lua-l archive

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

> If you want to avoid external dependencies, you can write your own bignum
> library in lua to deal with numbers 52+52=104 bits wide. Values would be (a
> * 2^52 + b) where a is the top 52 bits and b the bottom ones, so it's just a
> question of math to derive the arithmetic operations ;)


Found this bit here (~1000
conversions per second on my machine), maybe I should try optimize the
__mul and __add on that code and just do hi*2^32+lo and be done with