native Lua  0.5.0-devel
Lua on the platform you use with the compiler you choose
Data Structures | Macros | Typedefs | Functions
lmathlib.c File Reference
#include "lprefix.h"
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#include "_native_lua_config.h"
Include dependency graph for lmathlib.c:

Data Structures

struct  Rand64
 
struct  RanState
 

Macros

#define lmathlib_c
 
#define LUA_LIB
 
#define PI   (l_mathop(3.141592653589793238462643383279502884))
 
#define FIGS   l_floatatt(MANT_DIG)
 
#define trim32(x)   ((x) & 0xffffffffu)
 
#define UONE   ((lu_int32)1)
 
#define scaleFIG   (l_mathop(0.5) / (UONE << (FIGS - 1)))
 

Typedefs

typedef unsigned long lu_int32
 
typedef struct Rand64 Rand64
 

Functions

LUAMOD_API int luaopen_math (lua_State *L)
 

Macro Definition Documentation

◆ FIGS

#define FIGS   l_floatatt(MANT_DIG)

◆ lmathlib_c

#define lmathlib_c

◆ LUA_LIB

#define LUA_LIB

◆ PI

#define PI   (l_mathop(3.141592653589793238462643383279502884))

◆ scaleFIG

#define scaleFIG   (l_mathop(0.5) / (UONE << (FIGS - 1)))

◆ trim32

#define trim32 (   x)    ((x) & 0xffffffffu)

◆ UONE

#define UONE   ((lu_int32)1)

Typedef Documentation

◆ lu_int32

typedef unsigned long lu_int32

◆ Rand64

typedef struct Rand64 Rand64

Function Documentation

◆ luaopen_math()

LUAMOD_API int luaopen_math ( lua_State L)