anchor.diff:                      GO TO 35
                    ENDIF
   30            CONTINUE
  -35            IF (K.NE.1.AND.H(K).LT.H(K-1)) H(K)=H(K-1)
  +35            IF (K.NE.1) THEN
  +                 IF(H(K).LT.H(K-1)) H(K)=H(K-1)
  +              ENDIF
   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
  
positive.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 20
          IF (L.GE.1 .AND. X.LE.RY0(L)+0.5) THEN
             X=XGUESS+PI
             XGUESS=X
             GO TO 20
          END IF
          L=L+1
          RY0(L)=X
  
negative.code:         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)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
  