Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <array>
- #include <cassert>
- #include <climits>
- #include <cmath>
- #include <cstring>
- #include <iomanip>
- #include <iostream>
- #include <limits>
- #include <list>
- #include <map>
- #include <numeric>
- #include <numbers>
- #include <queue>
- #include <set>
- #include <sstream>
- #include <stack>
- #include <string>
- #include <tuple>
- #include <unordered_map>
- #include <unordered_set>
- #include <vector>
- #define all(x) x.begin(), x.end()
- using namespace std;
- using ll = long long;
- using ld = long double;
- const double eps = 1e-10;
- const int mod = 1000000007;
- void Solve() {
- float l = 0., r = 1.;
- for (int i = 0; i < 100; ++i) {
- float m = (l + r) / 2.;
- if (m + m == 0.0f)
- l = m;
- else
- r = m;
- }
- cout << setprecision(10) << l << "\n";
- }
- void Angles() {
- cout << setprecision(40) << fixed;
- cout << M_PI << "\n";
- cout << acosl(-1.) << " " << abs(acosl(-1.) - M_PI) << "\n";
- cout << atan2l(0., -1.) << " " << abs(atan2l(0., -1.) - M_PI) << "\n";
- cout << std::numbers::pi_v<ld> << "\n";
- }
- int main() {
- ios::sync_with_stdio(false);
- cin.tie(nullptr);
- cout.tie(nullptr);
- Angles();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement