      SUBROUTINE PLEM1(Z, W, IERR)
C
C     FIRST DERIVATIVE OF WEIERSTRASS P-FUNCTION IN THE
C     LEMNISCATIC CASE FOR COMPLEX ARGUMENT
C     WITH UNIT PERIOD PARALLELOGRAM
C
      COMPLEX Z, Z1, Z3, Z4, W
      REAL ZR, ZI
      INTEGER IERR, M, N
C
C     REDUCTION TO FUNDAMENTAL PARALLELOGRAM
C
      ZR = REAL(Z) + 0.5E0
      ZI = AIMAG(Z) + 0.5E0
      M = INT(ZR)
      N = INT(ZI)
      IF (ZR.LT.0E0) M = M - 1
      IF (ZI.LT.0E0) N = N - 1
      Z1 = Z - FLOAT(M) - (0E0,1E0)*FLOAT(N)
C
C     IF Z1=0 THEN Z COINCIDES WITH A LATTICE POINT.
C     THE LATTICE POINTS ARE POLES FOR DP.
C
      Z3 = Z1*Z1*Z1
      Z4 = Z3*Z1
      W = (Z1*(1E0-Z4))**3
      ZR = ABS(REAL(W)) + ABS(AIMAG(W))
      IF (ZR.NE.0E0) GO TO 10
      IERR = 1
      RETURN
C
C     EVALUATION OF DP(Z1)
C
   10 IERR = 0
      W = (((1E1*Z4+9E1)*Z4+3E1)*Z4-2E0)/W +
     * Z1*((((((((((-3.9046302E-9*Z4-1.001487137E-8)*Z4+5.9573043092E-7)
     * *Z4-2.482518130524E-5)*Z4+1.4557266595395E-4)*
     * Z4+4.56633655643206E-3)*Z4+6.224782572111135E-2)*
     * Z4+1.038527937794269E-2)*Z4+1.19804620802637942E0)*
     * Z4+6.42791439683811718E0)*Z4-5.09272798707661477E0)/
     * ((((((((((4.726888E-11*Z4-3.0667983E-9)*Z4+1.0087596089E-7)*
     * Z4-8.060683451E-8)*Z4+1.184299251664E-5)*Z4-2.3096723361547E-4)*
     * Z4-2.90730903142055E-3)*Z4+1.338392411135511E-2)*
     * Z4+2.3098639320021426E-1)*Z4+8.4719880964554148E-1)*Z4+1E0)
      RETURN
      END
