anchor.diff:  
   	IMPLICIT NONE
   
  +CONTAINS
   	
  -	INTERFACE outerprod
  -		MODULE PROCEDURE outerprod_r
  -	END INTERFACE
  -
  -	INTERFACE assert_eq
  -		MODULE PROCEDURE assert_eq2,assert_eq3,assert_eq4,assert_eqn
  -	END INTERFACE
  -
  -
  -CONTAINS
  -
  -		FUNCTION assert_eq2(n1,n2,string)
  -	CHARACTER(LEN=*), INTENT(IN) :: string
  -	INTEGER, INTENT(IN) :: n1,n2
  -	INTEGER :: assert_eq2
  -	if (n1 == n2) then
  -		assert_eq2=n1
  -	else
  -		write (*,*) 'nrerror: an assert_eq failed with this tag:', &
  -			string
  -		STOP 'program terminated by assert_eq2'
  -	end if
  -	END FUNCTION assert_eq2
  -!BL
  -	FUNCTION assert_eq3(n1,n2,n3,string)
  -	CHARACTER(LEN=*), INTENT(IN) :: string
  -	INTEGER, INTENT(IN) :: n1,n2,n3
  -	INTEGER :: assert_eq3
  -	if (n1 == n2 .and. n2 == n3) then
  -		assert_eq3=n1
  -	else
  -		write (*,*) 'nrerror: an assert_eq failed with this tag:', &
  -			string
  -		STOP 'program terminated by assert_eq3'
  -	end if
  -	END FUNCTION assert_eq3
  -!BL
  -	FUNCTION assert_eq4(n1,n2,n3,n4,string)
  -	CHARACTER(LEN=*), INTENT(IN) :: string
  -	INTEGER, INTENT(IN) :: n1,n2,n3,n4
  -	INTEGER :: assert_eq4
  -	if (n1 == n2 .and. n2 == n3 .and. n3 == n4) then
  -		assert_eq4=n1
  -	else
  -		write (*,*) 'nrerror: an assert_eq failed with this tag:', &
  -			string
  -		STOP 'program terminated by assert_eq4'
  -	end if
  -	END FUNCTION assert_eq4
  -!BL
  -	FUNCTION assert_eqn(nn,string)
  -	CHARACTER(LEN=*), INTENT(IN) :: string
  -	INTEGER, DIMENSION(:), INTENT(IN) :: nn
  -	INTEGER :: assert_eqn
  -	if (all(nn(2:) == nn(1))) then
  -		assert_eqn=nn(1)
  -	else
  -		write (*,*) 'nrerror: an assert_eq failed with this tag:', &
  -			string
  -		STOP 'program terminated by assert_eqn'
  -	end if
  -	END FUNCTION assert_eqn
   
   	FUNCTION vabs(v)
   	REAL(SP), DIMENSION(:), INTENT(IN) :: v
  
positive.code: 	END SUBROUTINE dfpmin
  
  	SUBROUTINE lnsrch(xold,fold,g,p,x,f,stpmax,check,func)
  	IMPLICIT NONE
  	REAL(SP), DIMENSION(:), INTENT(IN) :: xold,g
  	REAL(SP), DIMENSION(:), INTENT(INOUT) :: p
  	REAL(SP), INTENT(IN) :: fold,stpmax
  
negative.code: 	INTEGER(our_int) :: ndum
  	REAL(SP) :: a,alam,alam2,alamin,b,disc,f2,fold2,pabs,rhs1,rhs2,slope,&
  		tmplam
  	ndum=size(g)
  	check=.false.
  	pabs=vabs(p(:))
  	if (pabs > stpmax) p(:)=p(:)*stpmax/pabs
  