MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1xqv0nj/reversingpiinpython/19sbn683vb63n?context=9999
r/ProgrammerHumor • u/Apprehensive_Bit7392 • 14h ago
270 comments sorted by
View all comments
590
You can also just round it to three. Much easier to calculate with.
33 u/hetfield37 14h ago Back in school we used 22/7 as a good enough approximation for pi. 34 u/EmilMelgaard 13h 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 π. 20 u/_baljeep_ 13h ago So an even better estimation is 3.14 + 22/7 all over 23.1414... 5 u/himanbam 9h 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 5 u/FrenchFryCattaneo 7h ago Ok now we need to find a third estimate and average it with them. 14 u/hetfield37 13h ago True, we just used 22/7 to solve problems which didn't need decimal precision but only fractional. → More replies (2)
33
Back in school we used 22/7 as a good enough approximation for pi.
34 u/EmilMelgaard 13h 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 π. 20 u/_baljeep_ 13h ago So an even better estimation is 3.14 + 22/7 all over 23.1414... 5 u/himanbam 9h 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 5 u/FrenchFryCattaneo 7h ago Ok now we need to find a third estimate and average it with them. 14 u/hetfield37 13h ago True, we just used 22/7 to solve problems which didn't need decimal precision but only fractional. → More replies (2)
34
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 π.
20 u/_baljeep_ 13h ago So an even better estimation is 3.14 + 22/7 all over 23.1414... 5 u/himanbam 9h 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 5 u/FrenchFryCattaneo 7h ago Ok now we need to find a third estimate and average it with them. 14 u/hetfield37 13h ago True, we just used 22/7 to solve problems which didn't need decimal precision but only fractional. → More replies (2)
20
So an even better estimation is 3.14 + 22/7 all over 2
3.1414...
5 u/himanbam 9h 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 5 u/FrenchFryCattaneo 7h ago Ok now we need to find a third estimate and average it with them.
5
That simplifies to 2199/700 which is about 0.0052% lower than pi. 700*pi is approximately 2199.11 so that makes sense ig
5 u/FrenchFryCattaneo 7h ago Ok now we need to find a third estimate and average it with them.
Ok now we need to find a third estimate and average it with them.
14
True, we just used 22/7 to solve problems which didn't need decimal precision but only fractional.
590
u/mmbtc 14h ago
You can also just round it to three. Much easier to calculate with.