Skip to content

math.NumApprox.Function.argMax_goldenSectionSearch

Christian d'Heureuse edited this page Jun 7, 2026 · 2 revisions

dsp-collection / math/NumApprox / argMax_goldenSectionSearch

Function: argMax_goldenSectionSearch()

function argMax_goldenSectionSearch(
   f, 
   argLo, 
   argHi, 
   tolerance): number;

Defined in: math/NumApprox.ts:83

Searches for the argument of a function maximum by using golden-section search.

The passed function should be strictly unimodal within the specified argument range.

Parameters

f

(x) => number

An univariate numeric function.

argLo

number

Lower range limit for the function argument.

argHi

number

Upper range limit for the function argument.

tolerance

number

Allowed approximation error for the result.

Returns

number

The argument that produces the maximum function value.

Clone this wiki locally