lua-users home
lua-l archive

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


> Has anyone already tried to compile Lua with lua_Number defined as the
> "long double" C data type?

These changes in luaconf.h seem to work fine with "make ansi".

#define LUA_NUMBER	long double
#define LUA_NUMBER_SCAN		"%Lf"
#define LUA_NUMBER_FMT		"%.14Lg"

I've used ansi to avoid the integer conversion tricks, which are specific to
doubles, I guess.