Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- long double f(long double x)
- {
- return log(sin(1e-3 * x) * pow(x, 10.0) * log2(pow(x, pow(x, 0.02))));
- }
- signed main()
- {
- cout << fixed << setprecision(10);
- long double best = 2866;
- long double l = 2865, r = 2867;
- while (r - l > 1e-8) {
- double m1 = l + (r - l) / 3,
- m2 = r - (r - l) / 3;
- if (f (m1) < f (m2))
- l = m1;
- else
- r = m2;
- }
- cout << l;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement