Numerical function analysis and optimization