return the smallest component of vector and its index
function mini input Real A[:]; output Real Y; output Integer index; end mini;