method

frexp

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

Returns a two-element array containing the normalized fraction (a Float) and exponent (an Integer) of x.

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