method

frexp

v1_9_3_125 - Show latest stable - Class: Math
frexp(p1)
public

Returns a two-element array containing the normalized fraction (a Float) and exponent (a Fixnum) of numeric.

fraction, exponent = Math.frexp(1234)   #=> [0.6025390625, 11]
fraction * 2**exponent                  #=> 1234.0