1 frexp(S) ____________________________________________________________ _f_r_e_x_p_,_ _f_r_e_x_p_f_,_ _f_r_e_x_p_l_,_ _i_l_o_g_b_,_ _i_l_o_g_b_f_,_ _i_l_o_g_b_l_,_ _l_d_e_x_p_,_ _l_d_e_x_p_f_, _l_d_e_x_p_l_,_ _l_o_g_b_,_ _l_o_g_b_f_,_ _l_o_g_b_l_,_ _m_o_d_f_,_ _m_o_d_f_f_,_ _m_o_d_f_l_,_ _n_e_x_t_a_f_t_e_r_, _n_e_x_t_a_f_t_e_r_f_,_ _n_e_x_t_a_f_t_e_r_l_,_ _s_c_a_l_b_,_ _s_c_a_l_b_f_,_ _s_c_a_l_b_l_ _-_-_ _m_a_n_i_p_u_l_a_t_e_ _p_a_r_t_s _o_f_ _f_l_o_a_t_i_n_g_-_p_o_i_n_t_ _n_u_m_b_e_r_s_ Synopsis #include double frexp(double _v_a_l_u_e, int *_e_p_t_r); float frexpf(float _v_a_l_u_e, int *_e_p_t_r); long double frexpl(long double _v_a_l_u_e, int *_e_p_t_r); int ilogb(double _v_a_l_u_e); int ilogbf(float _v_a_l_u_e); int ilogbl(long double _v_a_l_u_e); double ldexp(double _v_a_l_u_e, int _e_x_p); float ldexpf(float _v_a_l_u_e, int _e_x_p); long double ldexpl(long double _v_a_l_u_e, int _e_x_p); double logb(double _v_a_l_u_e); float logbf(float _v_a_l_u_e); long double logbl(long double _v_a_l_u_e); double nextafter(double _v_a_l_u_e_1, double _v_a_l_u_e_2); float nextafterf(float _v_a_l_u_e_1, float _v_a_l_u_e_2); long double nextafterl(long double _v_a_l_u_e_1, long double _v_a_l_u_e_2); double scalb(double _v_a_l_u_e, double _e_x_p); float scalbf(float _v_a_l_u_e, float _e_x_p); long double scalbl(long double _v_a_l_u_e, long double _e_x_p); double modf(double _v_a_l_u_e, double *_i_p_t_r); float modff(float _v_a_l_u_e, float *_i_p_t_r); long double modfl(long double _v_a_l_u_e, long double *_i_p_t_r); Description Every non-zero number can be written uniquely as _x*2^_n, where the ``mantissa'' (fraction) _x is in the range 0.5 LESS THAN OR EQUAL TO | _x | < 1.0, and the ``exponent'' _n is an integer. _f_r_e_x_p returns the mantissa of a double _v_a_l_u_e and stores the exponent indirectly in the location pointed to by _e_p_t_r. If _v_a_l_u_e is zero, both results returned by _f_r_e_x_p are zero. _f_r_e_x_p_f returns the mantissa of a float _v_a_l_u_e. _f_r_e_x_p_l returns the mantissa of a long double _v_a_l_u_e. _i_l_o_g_b, _i_l_o_g_b_f and _i_l_o_g_b_l return the (unbiased) exponent part of _v_a_l_u_e. It is equivalent to (_i_n_t)_l_o_g_b_[_f_|_l_](_v_a_l_u_e). _l_d_e_x_p, _l_d_e_x_p_f, _l_d_e_x_p_l, _s_c_a_l_b, _s_c_a_l_b_f and _s_c_a_l_b_l return the quantity _v_a_l_u_e*2^_e_x_p. _l_o_g_b returns the unbiased exponent of its floating-point argument as a double-precision floating-point value. _l_o_g_b_f returns the unbiased exponent of its floating-point argument as an float-precision floating-point value. _l_o_g_b_l returns the unbiased exponent of its floating-point argument as an extended double-precision floating-point value. _m_o_d_f, _m_o_d_f_f and _m_o_d_f_l return the signed fractional part of _v_a_l_u_e and store the integral part indirectly in the location pointed to by _i_p_t_r. _n_e_x_t_a_f_t_e_r, _n_e_x_t_a_f_t_e_r_f and _n_e_x_t_a_f_t_e_r_l return the next representable floating-point value following _v_a_l_u_e_1 in the direction of _v_a_l_u_e_2. Thus, if _v_a_l_u_e_2 is less than _v_a_l_u_e_1, _n_e_x_t_a_f_t_e_r, _n_e_x_t_a_f_t_e_r_f and _n_e_x_t_a_f_t_e_r_l return the largest representable floating-point number less than _v_a_l_u_e_1. Errors If _v_a_l_u_e is 0 or _N_a_N, _i_l_o_g_b, _i_l_o_g_b_f and _i_l_o_g_b_l return _I_N_T___M_I_N. If _v_a_l_u_e is _+_-_ _i_n_f_i_n_i_t_y, _i_l_o_g_b, _i_l_o_g_b_f and _i_l_o_g_b_l return _I_N_T___M_A_X. If the correct value of _l_d_e_x_p, _l_d_e_x_p_f, _l_d_e_x_p_l, _s_c_a_l_b, _s_c_a_l_b_f or _s_c_a_l_b_l would cause overflow, these functions return a value that will compare equal to _+_-_H_U_G_E___V_A_L (according to the sign of _v_a_l_u_e) and set _e_r_r_n_o to _E_R_A_N_G_E. If the correct value of these functions would cause underflow, zero is returned and _e_r_r_n_o is set to _E_R_A_N_G_E. _l_o_g_b or _l_o_g_b_l of zero returns _-_H_U_G_E___V_A_L; on systems that support IEEE floating-point, the divide by zero exception is raised. On systems that support IEEE floating-point, _s_c_a_l_b, _s_c_a_l_b_f, _s_c_a_l_b_f, _l_o_g_b, _l_o_g_b_f or _l_o_g_b_l of _+_-_ _i_n_f_i_n_i_t_y returns _+_ _i_n_f_i_n_i_t_y. For both of these error cases, _e_r_r_n_o is set to _E_D_O_M. On systems that support IEEE floating-point, if input _v_a_l_u_e_1 to _n_e_x_t_a_f_t_e_r, _n_e_x_t_a_f_t_e_r_f or _n_e_x_t_a_f_t_e_r_l is _+_-_ _i_n_f_i_n_i_t_y, that input is returned and _e_r_r_n_o is set to _E_D_O_M. The overflow and inexact exceptions are signaled when input _v_a_l_u_e_1 is finite, but nextafter(_v_a_l_u_e_1, _v_a_l_u_e_2) is not. The underflow and inexact exceptions are signaled when the returned value is denormalized. In both cases _e_r_r_n_o is set to _E_R_A_N_G_E. (These last two conditions apply to _n_e_x_t_a_f_t_e_r_l, as well.) On systems that support IEEE _N_a_N, if the input to any of these functions is a quiet _N_a_N, that _N_a_N is returned. If the input is a signaling _N_a_N, a quiet _N_a_N is returned and the invalid operation exception is raised. In either case, _e_r_r_n_o is set to _E_D_O_M. When the program is compiled with the _c_c option _-_X_t [see cccc((CC))], the returned value of _l_d_e_x_p, _l_d_e_x_p_l, _s_c_a_l_b, _s_c_a_l_b_f and _s_c_a_l_b_l will compare equal to _H_U_G_E instead of _H_U_G_E___V_A_L. References cccc((CC)), iinnttrroo((SS)) ____________________________________________________________ ((cc))  22000055  TThhee  SSCCOO  GGrroouupp,,  IInncc..  AAllll  rriigghhttss  rreesseerrvveedd.. _S_C_O_ _O_p_e_n_S_e_r_v_e_r_ _R_e_l_e_a_s_e_ _6_._0_._0_ _-_ _0_1_ _J_u_n_e_ _2_0_0_5