C   25/06/78 C8080901   MEMBER NAME  RANAZI   (LGSOURCE)    FORTRAN
      SUBROUTINE RANAZI(C,S)
C
C     A.SATO, MODIFIED BY S.YAMADA
C     LAST MODIFICATION 09-08-78  10:20
C
C---- GET COS AND SIN OF RUNDOMLY DISTRIBUTED PHI.
C
    1 XR1=RN(DUM)
      XR2=RN(DUM)
      IF(XR1.EQ.0. .AND. XR2.EQ.0.) GO TO 90
      XR1=2.*(XR1-.5)
      X=XR1*XR1+XR2*XR2
      IF(X-1.) 2,2,1
    2 IF(X) 1,1,3
    3 C=(XR1*XR1-XR2*XR2)/X
      S=2.*XR1*XR2/X
      RETURN
C
   90 WRITE(6,690)
  690 FORMAT('0**** 2 SUCCESSIVE RANDOM NUMBERS ARE 0.IN NEWDR1.***',
     1        /'  EMERGENCY STOP')
      STOP
      END
