MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / numarith

Function numarith

third-party/lua-5.5.0/src/lobject.c:135–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133
134
135static lua_Number numarith (lua_State *L, int op, lua_Number v1,
136 lua_Number v2) {
137 switch (op) {
138 case LUA_OPADD: return luai_numadd(L, v1, v2);
139 case LUA_OPSUB: return luai_numsub(L, v1, v2);
140 case LUA_OPMUL: return luai_nummul(L, v1, v2);
141 case LUA_OPDIV: return luai_numdiv(L, v1, v2);
142 case LUA_OPPOW: return luai_numpow(L, v1, v2);
143 case LUA_OPIDIV: return luai_numidiv(L, v1, v2);
144 case LUA_OPUNM: return luai_numunm(L, v1);
145 case LUA_OPMOD: return luaV_modf(L, v1, v2);
146 default: lua_assert(0); return 0;
147 }
148}
149
150
151int luaO_rawarith (lua_State *L, int op, const TValue *p1, const TValue *p2,

Callers 1

luaO_rawarithFunction · 0.70

Calls 1

luaV_modfFunction · 0.70

Tested by

no test coverage detected