y_eq_y_div_x.F


c**********************************************************************
#include "author.inc"
c*    $Id: y_eq_y_div_x.F,v 1.1 1996/02/14 20:03:12 turner Exp $
c*
c*    Divide each element in y by each element in x and store the
c*    result in y.
c*
c*    <PARAMETER LIST>
c*
c*     Input:
c*      n - number of elements
c*      x - x-vector
c*
c*     In/Out:
c*      y - y-vector
c*
c*     Output:
c*      status - return status
c*
#include "copyright.inc"
c**********************************************************************
      subroutine JT_y_eq_y_div_x (n, x, y, status)
      implicit none
c
c ... Input:
      integer n
      real x(n)
c
c ... In/Out:
      real y(n)
c
c ... Output:
      integer status
c
c ... Local:
      integer i
      real zero
      parameter (zero=0.0d0)
c
      do i=1,n
       if (x(i) .ne. zero) then
        y(i) = y(i) / x(i)
       else
        y(i) = zero
       endif
      enddo
c
      status = 0
      return
      end