real(wp), dimension(:), allocatable, save :: data
    contains

    subroutine store_data( array )
        real(wp), dimension(:) :: data
        ... copy the data
    end subroutine store_data

    real(wp) function f(x)
        real(wp), dimension(:) :: x
        ... use x and data to determine the value of f
    end function f
    end module
</pre></td></tr></table></p>

<br><br>
<li>
Use the code for <em>find_minimum</em> to implement the evaluation of the
function in the way required.