anchor.diff:          
           INTEGER(ip), PARAMETER:: ninterp_points = 601
           LOGICAL, PARAMETER:: log_transform_interpolation = .FALSE.
  -        REAL(dp):: kj_xs(ninterp_points), kj_ys(ninterp_points)
  +        REAL(dp):: kj_xs(ninterp_points), kj_ys(ninterp_points), precomputed_gradient(ninterp_points - 1)
   
           ! Make the kajiura_G_interpolator
           DO i = 1, ninterp_points
  
positive.code:             ELSE
                  lower = 1
                  upper = n
                  i = floor(0.5_dp*(lower + upper))
                  DO WHILE ((x(i) > y).OR.(x(i+1) < y))
                     IF(x(i) > y) THEN
                         upper = i
                     ELSE
                         lower = i
                     END IF
                     i = floor(0.5_dp*(lower + upper))
                  END DO
  
                  IF ( y - x(i) > x(i+1) - y) THEN
  
negative.code:         END DO
          kj_ys = kajiura_G(kj_xs)
          if(log_transform_interpolation) kj_ys = log(kj_ys)
  
          precomputed_gradient = (kj_ys(2:ninterp_points) - kj_ys(1:(ninterp_points-1)))/&
              (kj_xs(2:ninterp_points) - kj_xs(1:(ninterp_points-1)))
          !CALL kajiura_G_log_interpolator%initialise(kj_xs, kj_ys, copy_data=.FALSE.)
  
          output = 0.0_dp
  