r/ProgrammerHumor • • 25d ago

Meme reversingPiInPython

Post image
14k Upvotes

383 comments sorted by

View all comments

766

u/mmbtc 25d ago

You can also just round it to three. Much easier to calculate with.

305

u/nicki419 25d ago

*clears throat*

e ≈ 3 ≈ π

169

u/AvailableUsername404 25d ago

π2 ≈ g ≈ 10

56

u/DaemonG 25d ago

sqrt(10) ≈ n ≈ 3

36

u/Weird_Photograph_248 24d ago

heh, you wrote squirt

→ More replies (1)

27

u/heaving_in_my_vines 25d ago

≈ tree fiddy

12

u/nicki419 25d ago

That would round up to 4, actually

14

u/Legitimate_Concern_5 25d ago edited 25d ago

Depends on your rounding strategy, sometimes 3 sometime 4. Round half up is the most common but you can round half down, round half towards even (Banker's rounding/Gaussian rounding), round half towards odd, or towards/away from infinity.

→ More replies (2)
→ More replies (1)
→ More replies (1)
→ More replies (2)

203

u/oalfonso 25d ago

Found the mechanical engineer

63

u/lNFORMATlVE 24d ago

The structural engineer: let’s use pi = 10 for safety margin

20

u/ncatter 24d ago

In software we usually just taken out result and mltiply with pi then estimation fits reality.

That number has so many use cases.

35

u/hetfield37 25d ago

Back in school we used 22/7 as a good enough approximation for pi.

40

u/EmilMelgaard 25d 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_ 25d ago

So an even better estimation is 3.14 + 22/7 all over 2

3.1414...

9

u/himanbam 24d 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 24d ago

Ok now we need to find a third estimate and average it with them.

16

u/hetfield37 25d ago

True, we just used 22/7 to solve problems which didn't need decimal precision but only fractional.

→ More replies (3)

4

u/enti134 25d ago

Ok Bloody Stupid Johnson

4

u/mmbtc 24d ago

Unexpected PTerry reference. I like it.

GNU PTerry

9

u/ul2006kevinb 24d ago

If it's good enough for the Bible it's good enough for me

"And he made a molten sea, ten cubits from the one brim to the other: it was round all about, and his height was five cubits: and a line of thirty cubits did compass it round about."

12

u/BullPropaganda 24d ago

The number of the mathing shall be 3. And 3 shall be the number of the mathing.

→ More replies (4)

11

u/CirnoIzumi 25d ago

mm, but you could round it to 4 for more precision

9

u/Throwaway11958 25d ago

safety margin

→ More replies (4)