lua-users home
lua-l archive

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

spir schrieb:
On Sat, 23 Jan 2010 20:34:39 +0100
spir <> wrote:


Is "maxInt == 1e14-1" true? (found by trying to display -- higher values get exp notation)

PS: Just read at that the mantissa is 52-bit wide. This should allow slightly bigger integers, no? (0xfffffffffffff ~ 4.5035996273705e+15, if I'm right)

Is there any available tool for bigger (accurate) integers / for arbitrary long integers?

I will need integers which width is n*24 bits, where n is not yet known, but for sure >= 3.


la vita e estrany

Most often the GMP package is a solution. Many FOSS-progs out of the math-spectrum use the GMP package.

May be that is another entry point to reach your goals:

#  LGMP - A GMP package for Lua 5.1

What it is: The LGMP package offers the GNU multiple precision arithmetic library (GMP) functionality in Lua 5.1. Only the integer, floating point and random state types are supported. The package is distributed under the MIT license and includes a manual.

Download: As a bz2 compressed tarball: lgmp.tar.bz2, or as a zip archive:

Regards BB