math.frexp

From Garry's Mod
Jump to: navigation, search
 math.frexp( )

Contents

Description

Used to split the number value into a normalized fraction and an exponent. Two values are returned: the first is a multiplier in the range 1/2 (inclusive) to 1 (exclusive) and the second is an integer exponent.

The result is such that x = m*2^e.

Arguments

number x

The value to get the normalized fraction and the exponent from.

Returns

number

m, multiplier - between 0.5 and 1

Returns

number

e, exponent - always an integer
Personal tools
Navigation