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 <denis.spir@free.fr> wrote:

Hello,

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

PS: Just read at http://stackoverflow.com/questions/945731/what-is-the-maximum-value-of-a-number-in-lua 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.


Denis
________________________________

la vita e estrany

http://spir.wikidot.com/

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:

http://members.chello.nl/~w.couwenberg/

#  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: lgmp.zip

Regards BB