+ 7
From this html page you could scrape 1 million digits of pi and look up the nth digit by string index. https://www.piday.org/million/ How many digits do you need? NASA uses only 15 decimal places. https://www.jpl.nasa.gov/edu/news/2016/3/16/how-many-decimals-of-pi-do-we-really-need/
2nd Oct 2020, 4:10 PM
Brian
Brian - avatar
+ 13
For now... I've used a string for all pi digits
2nd Oct 2020, 11:33 AM
JOY
JOY - avatar
+ 7
Gorom_Pani 🙄 That's not a spam Google about m_pi
2nd Oct 2020, 7:14 AM
Namit Jain
Namit Jain - avatar
+ 6
M_PI
2nd Oct 2020, 6:54 AM
KOENTRAO
KOENTRAO - avatar
+ 3
Ref.Machin's formula. But Max 15digits. Ref.my original code (Source list) //Machin's formula #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { long double pi ; pi = 4.0 * (4.0 * atan(1.0 / 5.0) - atan(1.0 / 239.0)); cout << setprecision(15) << pi << endl; return 0; }
2nd Oct 2020, 9:21 AM
Mitsukun
Mitsukun - avatar
+ 3
Gorom pani sir. Sorry. I not understand solution. Machin's formula for Wiki. I studing.Pi analysis.
2nd Oct 2020, 9:35 AM
Mitsukun
Mitsukun - avatar
+ 3
Try using std::numbers::pi_v<long double> defined in <numbers> I think its somewhat more accurate than M_PI. But I'm not very sure.
2nd Oct 2020, 11:01 AM
Anthony Maina
Anthony Maina - avatar
+ 2
using namespace std; void printValueOfPi() { double pi = 2 * asin(1.0); printf("%f\n", pi); } int main() { printValueOfPi();     return 0; } Output: 3.141593
4th Oct 2020, 2:26 AM
vaishnavi M
vaishnavi M - avatar
+ 1
use M_PI or acos(-1)
3rd Oct 2020, 5:29 PM
Mehrob Abdulvahobov
Mehrob Abdulvahobov - avatar
+ 1
the result is wrong -32 digit 5288 ... ---> 50288......
5th Oct 2020, 9:18 AM
M*S €(^-^()
M*S €(^-^() - avatar
0
you can measure the circumference of a circle using a string and a ruler then measure its diameter then divide the circumference by its diameter!
2nd Oct 2020, 5:20 PM
luna
luna - avatar
0
Include math.h and use ROUND function upto the 15th digit đŸ€” ❀ From memory 3.1415926 school 🚾
3rd Oct 2020, 5:05 PM
Sanjay Kamath
Sanjay Kamath - avatar
- 4
Alguien que me enseñe a programar en visual studio c#
4th Oct 2020, 2:14 AM
Edison
- 5
P= 3.14
3rd Oct 2020, 9:19 AM
Meruliya Yug
Meruliya Yug - avatar