lua-users home
lua-l archive

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


On Tue, Jun 5, 2018 at 2:33 AM, Albert Chan <albertmcchan@yahoo.com> wrote:

For 53 bits double, to make same math result across platform, 
maybe add this to Lua.c ? (even if not needed)

fesetenv (FE_PC53_ENV);

I suspect the result of that will not be truly cross-platform. Most platforms will fail to compile that [1], but I guess there is one that you happen to use (which one is it?) where that works. To make this truly cross-platform, you should rather say in its stead: #error I cannot set floating-point precision in a cross-platform way [2]

Cheers,
V.

[1] https://godbolt.org/g/XTxr1d

[2] https://gcc.gnu.org/wiki/x87note