Skip to content

Commit

Permalink
Add clarification on gss description (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanRenison authored Jan 9, 2024
1 parent 800c31d commit 782a5f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions content/numerical/GoldenSectionSearch.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* License: CC0
* Source: Numeriska algoritmer med matlab, Gerd Eriksson, NADA, KTH
* Description: Finds the argument minimizing the function $f$ in the interval $[a,b]$
* assuming $f$ is unimodal on the interval, i.e. has only one local minimum. The maximum
* error in the result is $eps$. Works equally well for maximization with a small change
* in the code. See TernarySearch.h in the Various chapter for a discrete version.
* assuming $f$ is unimodal on the interval, i.e. has only one local minimum and no local
* maximum. The maximum error in the result is $eps$. Works equally well for maximization
* with a small change in the code. See TernarySearch.h in the Various chapter for a
* discrete version.
* Usage:
double func(double x) { return 4+x+.3*x*x; }
double xmin = gss(-1000,1000,func);
Expand Down

0 comments on commit 782a5f4

Please sign in to comment.