home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3c / div.z / div
Encoding:
Text File  |  2002-10-03  |  2.4 KB  |  67 lines

  1.  
  2.  
  3.  
  4. DDDDIIIIVVVV((((3333CCCC))))                                                                DDDDIIIIVVVV((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      div, ldiv - perform integer division
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddlllliiiibbbb....hhhh>>>>
  13.  
  14.      ddddiiiivvvv____tttt ddddiiiivvvv ((((iiiinnnntttt nnnnuuuummmmeeeerrrr,,,, iiiinnnntttt ddddeeeennnnoooommmm))));;;;
  15.  
  16.      llllddddiiiivvvv____tttt llllddddiiiivvvv ((((lllloooonnnngggg iiiinnnntttt nnnnuuuummmmeeeerrrr,,,, lllloooonnnngggg iiiinnnntttt ddddeeeennnnoooommmm))));;;;
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      _d_i_v and _l_d_i_v compute the quotient and remainder resulting from the
  20.      division of the integer dividend _n_u_m_e_r by the integer divisor _d_e_n_o_m.  If
  21.      the division is inexact, the quotient will be the nearest integer with
  22.      less magnitude than the algebraic quotient (e.g., _d_i_v(_5/_2) yields _2, and
  23.      _d_i_v(-_5/_2) yields -_2).
  24.  
  25.      _d_i_v operates on and returns iiiinnnntttt quantities. _l_d_i_v operates on and returns
  26.      lllloooonnnngggg iiiinnnntttt quantities.
  27.  
  28.      Unless the result cannot be represented, _d_i_v and _l_d_i_v return the result
  29.      in a structure (ddddiiiivvvv____tttt for _d_i_v, llllddddiiiivvvv____tttt for _l_d_i_v) which has two integer
  30.      members: the quotient, _q_u_o_t, and the remainder, _r_e_m.  These members are
  31.      of type iiiinnnntttt for _d_i_v, and lllloooonnnngggg iiiinnnntttt for _l_d_i_v.
  32.  
  33. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  34.      If _d_i_v or _l_d_i_v is invoked with a zero _d_e_n_o_m, the same integer divide-by-
  35.      zero trap occurs as if the integer division had occurred in-line.
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.