Ternary search works well

I thought that there will be presicion problems, but it turned out that ternary search works pretty well.

Re: Ternary search works well

There is a formula! It is so easy to find it using derivative! It is not so cool to solve this problem using ternary search!

Re: Ternary search works well

I tried but it was too difficult for me.

Re: Ternary search works well

Hmm, I spent about 3-5 minutes to find this formula :)