The some mathematical functions were been deprecated by Lua 5.3. There stay available with LUA_COMPAT_5_2. The third party library [mathx](http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/5.3/lmathx.tar.gz) supplies them too. Badly, `mathx` uses `luaL_checkint` instead of `luaL_checkinteger`. So, `mathx` must compiled with LUA_COMPAT_5_2. In conclusion, no working solution without LUA_COMPAT_5_2. François.