home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / Arithmetic < prev    next >
Encoding:
Text File  |  1997-04-23  |  865 b   |  38 lines

  1.     
  2.     _A_r_i_t_h_m_e_t_i_c _O_p_e_r_a_t_o_r_s
  3.     
  4.          x + y
  5.          x - y
  6.          x * y
  7.          x / y
  8.          x ^ y
  9.          x %% y
  10.          x %/% y
  11.     
  12.     _V_a_l_u_e:
  13.     
  14.          These binary operators perform arithmetic on vector
  15.          objects.  They return numeric vectors containing the
  16.          result of the element by element operations.  The ele-
  17.          ments of shorter vectors are recycled as necessary.
  18.          The operators are + for addition, - for subtraction *
  19.          for multiplication, / for division and ^ for exponen-
  20.          tiation.  %% indicates x mod y and %/% indicates
  21.          integer division.
  22.     
  23.          Objects such as arrays or time-series can be operated
  24.          on this way provided they are conformable.
  25.     
  26.     _S_e_e _A_l_s_o:
  27.     
  28.          Math.
  29.     
  30.     _E_x_a_m_p_l_e_s:
  31.     
  32.          x <- -1:12
  33.          x + 1
  34.          2 * x + 3
  35.          x %% 2
  36.          x %/% 5
  37.     
  38.