Re-compile lua to use double precision for floating-point numbers

Delbert Franz ddf at
Sun May 2 17:42:31 EDT 2010

I'm trying to set the values for Lua so that it will use double 
precision for floating point numbers.  Yes, I know it will be slow:) 
However, I am trying to compare the Nanonote to some other small 
computers I have, and all of them come with Lua set to use double 
precision for floating-pint numbers.  Since I am already doing a 
custom image for the Nanonote I thought it should not be that hard to 
get Lua compiled to do the same:) 

Well, it turns out to be rather too complex for me:( The latest 
version of Lua (5.1.4) from its website has a luaconf.h which contains 
the number definition.  Openwrt extensively patches/modifies this so 
that in addition to luaconf.h, there is a lnum_config.h file as well.  
Not having programmed in C for some decades, all of my attempts ended 
either not changing the number representation or in changing it in 
such a way that parts were broken.  

Does anyone on this list know what changes are required in luaconf.h 
and lnum_config.h so that Lua will properly use double-precision 
floating point numbers?  If not, what is the best place within the 
OpenWRT community to inquire as to how that should be done?  


More information about the discussion mailing list