anchor.diff:  
   
       type ncegm_model
  +        integer                                                      :: a_grid_length
           procedure(ReturnFunction), pointer, nopass                   :: F=>null(),dF=>null(),d2F=>null()    ! REQUIRED: return function F and first- and second derivatives with respect to c Fc and Fcc
           procedure(ReturnFunctionMarginalInverse), pointer, nopass    :: dF_inv=>null()                      ! OPTIONAL: inverse of marginal return function Fc'
           procedure(BudgetConstraint), pointer, nopass                 :: Gamma=>null()                       ! REQUIRED: budget constraint
  
positive.code: 
                              ! 4. Interpolate the value function, for all (d,s,z)
                              call egm_interpolate(d,s,z,m_grid(:,index_d,index_s,index_z),m_end(1:k),c_end(1:k),valuef_end(1:k),valuef_next_con(:,index_d,index_s,index_z),policy_c_con(:,index_d,index_s,index_z))
                              policy_a_prime_con(:,index_d,index_s,index_z) = m_grid(:,index_d,index_s,index_z) - policy_c_con(:,index_d,index_s,index_z)
                          end do
                      end do
                  end do
  
negative.code:             real(dp), dimension(glen_a), intent(out)  :: interpol_valuef,interpol_conditional_policy_c
              integer, dimension(glen_a)                :: map
              real(dp)                                  :: f_c1
              integer                                     :: i1
  
              f_c1 = F(c_end(1),d,s,z)
              ! Compute a mapping from the exogenous m-grid to the endogenous m-grid
  