      FUNCTION ARTNQ(Y,X)
      IF (X) 1,2,5
    1 ARTNQ=ATAN(Y/X)+3.1415926535898
      RETURN
    2 IF (Y) 3,8,4
    3 ARTNQ=4.7123889803847
      RETURN
    4 ARTNQ=1.5707963267949
      RETURN
    5 IF (Y) 6,8,7
    6 ARTNQ=ATAN(Y/X)+6.2831853071795
      RETURN
    7 ARTNQ=ATAN(Y/X)
      RETURN
    8 ARTNQ=0.
      RETURN
      END
