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]

