anchor.diff:                       destroy
   
     integer :: np, flag, nruns
  -  real(8) :: start, finish, p, ttime
  -
  -  real(8), allocatable :: x(:), l(:), u(:)
  +  real(8) :: start, finish, p, dfttime, fttime
  +
  +  real(8), allocatable :: x(:), l(:), u(:), dp(:)
   
     write(*,*) "This program tests the cost of derivatives"
     write(*,*) "of CCP functions"
   
     nruns = 10
   
  +  write(*,FMT=0002) 'DIM', 'F TIME', 'G TIME', 'RELATION'
  +
     do i = 1, 5
   
  +     fttime = 0.0D0
  +
  +     dfttime = 0.0D0
  +
        do j = 1, nruns
   
           np = 10 * i
   
  -        allocate(x(np),l(np),u(np))
  +        allocate(x(np),l(np),u(np),dp(np))
   
           call set_seed(12345678 + i * j)
  +
  +        ! Function
   
           call initialize(np, np, 0, x, l, u, 0.0D0)
   
  
positive.code:     end interface
  
      ! LOCAL SCALARS
      integer :: i, j, k, pos
      real(8) :: error, p, ff
  
      ! LOCAL ARRAYS
      real(8) :: l(n - 1), u(n - 1), ncorr((n - 2) * (n - 3) / 2)
      integer :: infty(n - 1)
  
      do k = 1,n
  
         ff = fgauss(x(k), MU(k), 1.0D0)
  
         if ( ff .lt. 1.0D-60 ) then
  
            pos = 1
  
            do j = 1, n
  
               if ( j .eq. k ) continue
  
               do i = 1, j - 1
  
                  if ( i .eq. k ) continue
  
                  ncorr(pos) = corr(i + (j - 1) * (j - 2) / 2)
  
                  pos = pos + 1
  
  
negative.code:           ! Affine transformation.
            ! Only need to shift 'mu'
  
            do i = 1, n
  
               if ( i .lt. k ) then
  
                  u(i) = x(i) - (MU(i) + (x(k) - MU(k)) * &
                                   corr(i + (k - 1) * (k - 2) / 2))
  
               else if ( i .gt. k ) then
  
                  u(i - 1) = x(i) - (MU(i) + (x(k) - MU(k)) * &
                                     corr(k + (i - 1) * (i - 2) / 2))
  
               end if
  
            end do
  
  