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


See also Lua library functions.

Signature:

m, e = frexp(x)

Arguments:

  • x - A number (number)

Returns:

  • 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