Spring Hire Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
08
:
04
:
48
:
40
Back to Dashboard
Unimodal Cost Function Minimum
Medium
Unimodal Cost Function Minimum
You are given a unimodal cost function f(x) = A * (x - C)^2 + D defined over the interval [lo, hi], where A > 0. The function has exactly one global minimum at x = C. Given the interval bounds lo and hi, a precision threshold precision, and the coefficients A, C, D, return any value x* in [lo, hi] such that |x* - C| <= precision.
...