lua-users home
lua-l archive

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

In message <>
          Egor Skriptunoff <> wrote:

>On Fri, Apr 2, 2021 at 1:51 AM Phil Leblanc wrote:
>> I would like to build Lua 5.3+ with only support for Integer numbers

Has Phil Leblanc seen Vicente's No Floating-Point Option for Lua 5.3
at ?

I built a version of Lua 5.3.5 for RISC OS  with no floating point numbers
but with the imath library to provide big integers. It has two integer types
'int32' (32-bit integers) and 'integer' (arbitrary size), informally 'small'
and 'big'. The function 'type' is redefined, and the metatable of the imath
library is given a key __type = "integer" .  A function imath.$ converts
small integers to big ones, and the values $0, ... , $9 are predefined in
a prelude.

For example:

print ($2^($2^10))  -->

Gavin Wraith (
Home page: