math.ldexp
Lua function

math.ldexp

Summary

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



See Also ...

Topics

DOC_lua_base Lua base functions
DOC_lua_bc Lua bc (big number) functions
DOC_lua_bit Lua bit manipulation functions
DOC_lua_coroutines Lua coroutine functions
DOC_lua_debug Lua debug functions
DOC_lua_io Lua io functions
DOC_lua_math Lua math functions
DOC_lua_os Lua os functions
DOC_lua_package Lua package functions
DOC_lua_rex Lua PCRE regular expression functions
DOC_lua Lua script extensions
DOC_lua_string Lua string functions
DOC_lua_tables Lua table functions
DOC_lua_utils Lua utilities
DOC_scripting Scripting

Lua functions

LUA_math.abs math.abs (Absolute value)
LUA_math.acos math.acos (Arc cosine)
LUA_math.asin math.asin (Arc sine)
LUA_math.atan math.atan (Arc tangent)
LUA_math.atan2 math.atan2 (Arc tangent of v1/v2)
LUA_math.ceil math.ceil (Next higher integer value)
LUA_math.cos math.cos (Cosine)
LUA_math.cosh math.cosh (Hyperbolic cosine)
LUA_math.deg math.deg (Convert from radians to degrees)
LUA_math.exp math.exp (Raises e to a power)
LUA_math.floor math.floor (Next smaller integer value)
LUA_math.fmod math.fmod (The modulus (remainder) of doing: v1 / v2)
LUA_math.frexp math.frexp (Break number into mantissa and exponent)
LUA_math.huge math.huge (A huge value)
LUA_math.log math.log (Natural log)
LUA_math.log10 math.log10 (Log to the base 10)
LUA_math.max math.max (The highest of one or more numbers)
LUA_math.min math.min (The lowest of one or more numbers)
LUA_math.modf math.modf (Returns the integral and fractional part of its argument)
LUA_math.pi math.pi (The value of pi)
LUA_math.pow math.pow (Raise a number to a power)
LUA_math.rad math.rad (Convert degrees to radians)
LUA_math.random math.random (Generate a random number)
LUA_math.randomseed math.randomseed (Seeds the random number generator)
LUA_math.sin math.sin (Sine)
LUA_math.sinh math.sinh (Hyperbolic sine)
LUA_math.sqrt math.sqrt (Square root)
LUA_math.tan math.tan (Tangent)
LUA_math.tanh math.tanh (Hyperbolic tangent)

(Help topic: lua=math.ldexp)

DOC_contents Documentation contents page