      SUBROUTINE RMAGAU(XG,YG) ! Bernd Berg, Sep 25 2000.
C  GENERATES INDEPENDENT RANDOM NUMBERS XG,YG WITH NORMAL PROBABILITY
C  DENSITY P(X)=EXP[-(X/SQRT(2))**2]/SQRT(2*PI), I.E. VARIANCE ONE.
      include '../../Libs/Fortran/implicit.sta'
      include '../../Libs/Fortran/constants.par'
      CALL RANMAR(XR)
      R=SQRT(ABS(TWO*LOG(ONE-XR))) ! XR can be zero but not one.
      CALL RANMAR(XR)
      XG=R*COS(TPI*XR)
      YG=R*SIN(TPI*XR)
      RETURN
      END 
