math_pow
function · lua · boundary
- Address
0x7fb050· 67 bytes, up to0x7fb092- Signature
int __fastcall (lua_State *L)- Meaning
- Pushes the first argument raised to the second
- Confidence
- verified, proof one
- Finding
- lua/libs#math-functions
Finding: Math functions in lua: the libraries
Twelve functions of the math library wrap one operation each: abs (fabs), sin, cos and
tan (fsin, fcos, fptan, in radians), atan and atan2 (fpatan), asin and acos (the
C runtime), floor, mod (fmod), sqrt (fsqrt) and pow. Each reads its arguments with
luaL_checknumber, pushes one number and answers 1. Nothing bounds the angle: a finite operand of
magnitude 2^63 or more is outside the x87's range, so math.sin(x) and math.cos(x) answer x
itself and math.tan(x) answers the x87's indefinite NaN, which tostring prints -1.#IND. ±∞
is an invalid operand, and all three answer the indefinite.
| function | name | decided by |
|---|---|---|
0x7fade0 | math_abs | fabs (0x7faded) |
0x7fae10 | math_sin | fsin (0x7fae1d) |
0x7fae40 | math_cos | fcos (0x7fae4d) |
0x7fae70 | math_tan | fptan (0x7fae7d), the extra 1.0 popped (0x7fae84) |
0x7faea0 | math_asin | the C runtime routine (0x7faead) |
0x7faed0 | math_acos | the C runtime routine (0x7faedd) |
0x7faf00 | math_atan | fld1; fpatan (0x7faf0d, 0x7faf0f) |
0x7faf30 | math_atan2 | two arguments, fpatan (0x7faf5a) |
0x7fafa0 | math_floor | C runtime floor (0x7fafb3) |
0x7fafd0 | math_mod | C runtime fmod (0x7faff7) |
0x7fb020 | math_sqrt | fsqrt (0x7fb02d) |
0x7fb050 | math_pow | C runtime pow (0x7fb077) |
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 3
- lua_pushnumber lua
- luaL_checknumber lua
- __CIpow crt
Calls and jumps by a bare address, from tables/calls.tsv.