Use lua_Number alias instead of double.