Optimization function Gauss tested