anchor.diff:          IF (X-X0.GT.1) X=X0+1
           IF (DABS(X-X0).GT.1.0D-11) GO TO 10
   C       3) initial guess for j_{N,L+1}
  -        IF (L.GE.1 .AND. X.LE.RJ0(L)+0.5) THEN
  -           X=XGUESS+PI
  -           XGUESS=X
  -           GO TO 10
  +        IF (L.GE.1)THEN
  +           IF (X.LE.RJ0(L)+0.5) THEN
  +              X=XGUESS+PI
  +              XGUESS=X
  +              GO TO 10
  +           ENDIF
           END IF
           L=L+1
           RJ0(L)=X
  
positive.code:                     GO TO 35
                   ENDIF
  30            CONTINUE
  35            IF (K.NE.1.AND.H(K).LT.H(K-1)) H(K)=H(K-1)
  40            X1=(B(K)+H(K))/2.0D0
                CV0(K)=X1
                IF (DABS((B(K)-H(K))/X1).LT.1.0D-14) GO TO 50
  
negative.code:         IF (X-X0.LT.-1) X=X0-1
          IF (X-X0.GT.1) X=X0+1
          IF (DABS(X-X0).GT.1.0D-11) GO TO 15
          IF (L.GE.1)THEN
             IF (X.LE.RJ1(L)+0.5) THEN
                X=XGUESS+PI
                XGUESS=X
                GO TO 15
             ENDIF
          END IF
          L=L+1
          RJ1(L)=X
  