y_eq_s_div_x.F
c**********************************************************************
#include "author.inc"
c* $Id: y_eq_s_div_x.F,v 1.4 1996/02/14 20:04:40 turner Exp $
c*
c* Computes y = s / x, where x and y are vectors and s is a scalar.
c*
c* <PARAMETER LIST>
c*
c* Input:
c* n - number of elements
c* s - scalar
c* x - vector to be copied
c*
c* Output:
c* y - destination vector
c* status - return status
c*
#include "copyright.inc"
c**********************************************************************
subroutine JT_y_eq_s_div_x (n, s, x, y, status)
implicit none
c
c ... Input:
integer n
real x(n), s
c
c ... Output:
integer status
real y(n)
c
c ... Local:
integer i
real zero
parameter (zero=0.0d0)
c
do i=1,n
if (x(i) .ne. zero) then
y(i) = s / x(i)
else
y(i) = zero
endif
enddo
c
status = 0
return
end