math.ldexp

Compute m* 2^n

Prototype

v = math.ldexp (m, n)

Description

The ldexp function returns the value of m * 2^n.

Note that math.frexp is the inverse operation.
 
math.ldexp (0.51060204851673, 81)   --> 1.23456e+024
math.ldexp (math.frexp (23452345) ) --> 23452345

Lua functions

Topics