MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1xqv0nj/reversingpiinpython/19sblkq1nue90/
r/ProgrammerHumor • u/Apprehensive_Bit7392 • 18d ago
383 comments sorted by
View all comments
Show parent comment
35
Back in school we used 22/7 as a good enough approximation for pi.
40 u/EmilMelgaard 18d ago 22/7 is about 0.04% larger than π, so that should be good enough for most applications. But you can also just use 3.14 as an approximation. It has the same number of digits to remember and is about 0.05% smaller than π. 23 u/_baljeep_ 18d ago So an even better estimation is 3.14 + 22/7 all over 23.1414... 9 u/himanbam 18d ago That simplifies to 2199/700 which is about 0.0052% lower than pi. 700*pi is approximately 2199.11 so that makes sense ig 7 u/FrenchFryCattaneo 18d ago Ok now we need to find a third estimate and average it with them. 16 u/hetfield37 18d ago True, we just used 22/7 to solve problems which didn't need decimal precision but only fractional. 1 u/MekaTriK 14d ago Man, I just remembered 3.14159265. Why? Idk, ask kid me. But it seems precise enough. 1 u/whalenailer 18d ago Do you actually think of things as “number of digits to remember? Who thinks of 22 as two digits and not just one number 8 u/EmilMelgaard 18d ago π is also just one number, so you could also just remember that. 12 u/FunTimesOnMars 18d ago 355/113
40
22/7 is about 0.04% larger than π, so that should be good enough for most applications. But you can also just use 3.14 as an approximation. It has the same number of digits to remember and is about 0.05% smaller than π.
23 u/_baljeep_ 18d ago So an even better estimation is 3.14 + 22/7 all over 23.1414... 9 u/himanbam 18d ago That simplifies to 2199/700 which is about 0.0052% lower than pi. 700*pi is approximately 2199.11 so that makes sense ig 7 u/FrenchFryCattaneo 18d ago Ok now we need to find a third estimate and average it with them. 16 u/hetfield37 18d ago True, we just used 22/7 to solve problems which didn't need decimal precision but only fractional. 1 u/MekaTriK 14d ago Man, I just remembered 3.14159265. Why? Idk, ask kid me. But it seems precise enough. 1 u/whalenailer 18d ago Do you actually think of things as “number of digits to remember? Who thinks of 22 as two digits and not just one number 8 u/EmilMelgaard 18d ago π is also just one number, so you could also just remember that.
23
So an even better estimation is 3.14 + 22/7 all over 2
3.1414...
9 u/himanbam 18d ago That simplifies to 2199/700 which is about 0.0052% lower than pi. 700*pi is approximately 2199.11 so that makes sense ig 7 u/FrenchFryCattaneo 18d ago Ok now we need to find a third estimate and average it with them.
9
That simplifies to 2199/700 which is about 0.0052% lower than pi. 700*pi is approximately 2199.11 so that makes sense ig
7 u/FrenchFryCattaneo 18d ago Ok now we need to find a third estimate and average it with them.
7
Ok now we need to find a third estimate and average it with them.
16
True, we just used 22/7 to solve problems which didn't need decimal precision but only fractional.
1
Man, I just remembered 3.14159265. Why? Idk, ask kid me. But it seems precise enough.
3.14159265
Do you actually think of things as “number of digits to remember? Who thinks of 22 as two digits and not just one number
8 u/EmilMelgaard 18d ago π is also just one number, so you could also just remember that.
8
π is also just one number, so you could also just remember that.
12
355/113
View all comments
Show parent comment
35
u/hetfield37 18d ago
Back in school we used 22/7 as a good enough approximation for pi.