golden search algorithm for cs3320