Returns the normalized fraction and base-2 exponent for a number. Alias for the standard library function math.frexp.

See also Lua library functions.


m, e = frexp(x)


  • x - A number (number)


  • m - A number whose absolute value is in the range [0.5, 1), or 0 if x is 0 (number)
  • e - An integer, such that x = m * 2 ^ e (number)
This function is defined in the Lua standard libraries