[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Build Lua with only integer numbers
- From: Phil Leblanc <philanc@...>
- Date: Sat, 3 Apr 2021 01:59:08 +0000
On Fri, Apr 2, 2021 at 11:14 PM Roberto Ierusalimschy
> > I am wondering, was removing the "number type selection macros" (or
> > rather limiting them to float vs double if I get it right) a decision
> > of the Lua team because of the increased complexity of Lua 5.3? or
> > was it a decision to "give up" MCus as a potential target and focus on
> > larger and more "modern" platforms (x86, ARM)?
> What do you mean by 'removing the "number type selection macros"'?
What I mean by 'removing "number type selection macros" (or rather
limiting them to float vs double if I get it right)" ' is the
My (limited) understanding at the moment is that it was possible to
build Lua5.1 with numbers being either floats or integers only by
changing a few macros in luaconf.h, and that it is no longer possible
to do this with Lua 5.3+:
Lua5.1/luaconf.h: @@ LUA_NUMBER is the type of numbers in Lua.
Lua5.4/luaconf.h: @@ LUA_NUMBER is the floating-point type used by Lua.
Thanks to the link kindly provided by Luiz, I read your suggestion on
the list in 2015  but didn't have time to test it. -- 
So, maybe I am wrong on this, and just by editing a few #define in
luaconf.h it is possible to build a Lua where all numbers are
integers, and my question is moot.
If not, I guess my question boils down to: do you consider that
building Lua without floats is now out of scope for the Lua team?
Hope it was more clear,