-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path20_pi.cpp
More file actions
20 lines (18 loc) · 741 Bytes
/
20_pi.cpp
File metadata and controls
20 lines (18 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
#include <cmath>
using namespace std;
int main(){
cout << "M_PI: " << M_PI << endl; // pi
cout << "M_PI_2: " << M_PI_2 << endl; // pi/2
cout << "M_PI_4: " << M_PI_4 << endl; // pi/4
cout << "M_1_PI: " << M_1_PI << endl; // 1/pi
cout << "M_2_PI: " << M_2_PI << endl; // 2/pi
cout << "M_2_SQRTPI: " << M_2_SQRTPI << endl; // 2/sqrt(pi)
cout << "M_SQRT2: " << M_SQRT2 << endl; // sqrt(2)
cout << "M_SQRT1_2: " << M_SQRT1_2 << endl; // 1/sqrt(2)
cout << "M_E: " << M_E << endl; // e
cout << "M_LOG2E: " << M_LOG2E << endl; // log_2(e)
cout << "M_LOG10E: " << M_LOG10E << endl; // log_10(e)
cout << "M_LN2: " << M_LN2 << endl; // log_e(2)
cout << "M_LN10: " << M_LN10 << endl; // log_e(10)
}