1 div(S) ____________________________________________________________ _d_i_v_,_ _l_d_i_v_,_ _l_l_d_i_v_ _-_-_ _c_o_m_p_u_t_e_ _t_h_e_ _q_u_o_t_i_e_n_t_ _a_n_d_ _r_e_m_a_i_n_d_e_r_ Synopsis #include div_t div(int _n_u_m_e_r, int _d_e_n_o_m); ldiv_t ldiv(long int _n_u_m_e_r, long int _d_e_n_o_m); lldiv_t lldiv(long long _n_u_m_e_r, long long _d_e_n_o_m); Description _d_i_v computes the quotient and remainder of the division of the numerator _n_u_m_e_r by the denominator _d_e_n_o_m. This function provides a well-defined semantics for the signed integral division and remainder operations, unlike the implementation-defined semantics of the built-in operations. The sign of the resulting quotient is that of the algebraic quotient, and, if the division is inexact, the magnitude of the resulting quotient is the largest integer less than the magnitude of the algebraic quotient. If the result cannot be represented, the behavior is undefined; otherwise, _q_u_o_t_i_e_n_t * _d_e_n_o_m + _r_e_m_a_i_n_d_e_r will equal _n_u_m_e_r. _d_i_v returns a structure of type _d_i_v___t, comprising both the quotient and remainder. Its members are: int quot; /*quotient*/ int rem; /*remainder*/ _l_d_i_v is similar to _d_i_v, except that the arguments and the members of the returned structure (which has type _l_d_i_v___t) all have type _l_o_n_g_ _i_n_t. _l_l_d_i_v is similar to _d_i_v, except that the arguments and the members of the returned structure (which has type _l_l_d_i_v___t) all have type _l_o_n_g_ _l_o_n_g. ____________________________________________________________ ((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