frexp                package:accuracy                R Documentation

_F_u_n_c_t_i_o_n _t_o _c_o_n_v_e_r_t _v_e_c_t_o_r _o_f _f_l_o_a_t_i_n_g-_p_o_i_n_t _n_u_m_b_e_r_s _t_o _f_r_a_c_t_i_o_n_a_l _a_n_d _i_n_t_e_g_r_a_l _c_o_m_p_o_n_e_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     The  frexp() function returns a matrix with the normalized
     fraction [.5,1) of the vector in the first column and the exponent
     (a power of two) in the second column. (If x is zero, then the
     normalized fraction is zero and zero is stored in the exponent.)

_U_s_a_g_e:

             frexp(v)

_A_r_g_u_m_e_n_t_s:

       v: vector of doubles 

_D_e_t_a_i_l_s:

     This is an R wrapper around the <math.h> frexp() function.

_V_a_l_u_e:

     Returns a 2xn matrix. Thethe normalized fraction [.5,1) of x is
     the first column and the exponent (a power of two) in the second
     column. (If x[i] is zero, then the normalized fraction of x[i] is
     zero and zero is stored in the exponent.)

_A_u_t_h_o_r(_s):

     Micah Altman Micah_Altman\@harvard.edu <URL:
     http://www.hmdc.harvard.edu/micah_altman/>

_R_e_f_e_r_e_n_c_e_s:

     Altman, M., J. Gill and M. P. McDonald.  2003.  _Numerical Issues
     in Statistical Computing for the Social Scientist_.  John Wiley &
     Sons. <URL: http://www.hmdc.harvard.edu/numerical_issues/>

_E_x_a_m_p_l_e_s:

     x = runif(10)
     y = frexp(x)
     y
     # this is now true by construction
     x==y[,1] *2^y[,2]

