Here is the code for the golden search algorithm.

Main Code

Main Code