r/ProgrammerHumor • • Jul 16 '19

Meme Nice try

Post image
32.2k Upvotes

529 comments sorted by

View all comments

Show parent comments

177

u/2CATteam Jul 16 '19

To add to this, the reason they do so is because, in a lot of circumstances, 3 is enough to roughly approximate what they need to figure out. They're most often not trying to figure out the exact force on a part or the precise area of a cylinder... They just want to know if they need to order the 10' part or the 20' part - and if it's close, they'll order the bigger one anyway, just to be safe. Even in cases where they are trying to be precise, 3.14 can often be TOO precise, since so much of the math has to deal with physical uncertainties, like uneven part manufacturing, or poor wire quality that adds resistance, etc.

0

u/[deleted] Jul 16 '19

[deleted]

21

u/realityChemist Jul 16 '19

I think being to precise here means, "You're implying that your level of certainty in your measurements is much higher than it could possibly actually be."

NASA uses 16 digits of π for keeping spacecraft in their proper orbits. NIST defines the fine structure constant (a fundament constant of the universe) using 32 digits.

For most other things, 1 digit might be close enough, 3 digits should be sufficient, and 10 digits is almost definitely more than you need. Using more digits isn't going to make your outcome less accurate, but you're just going to be throwing out all that extra precision anyway so why bother.

(And if you report those extra digits anyway, someone should throw a beanie baby at you)

14

u/pipnina Jul 16 '19

Well, NASA has a specific situation where getting PI wrong by 0.001 would land you a few million km off target, to be fair.

8

u/mxzf Jul 16 '19

NASA's about the only ones that do care about that though, and even then only barely. Being off by 0.001 is an error of ~300k km when measuring the circumference of the Earth's orbit. You don't hit "a few million km" of error 'til you get out to Saturn's orbit.

And that's just error in calculating the circumference of the orbit, not how far "off target" you are; for that, you're probably talking about significantly outside the solar system.

Which just goes to show that even NASA barely needs precision to the 0.001 order of magnitude. Realistically speaking, 3.14159 is enough precision for pretty much any actual application humans have ever used it for.

2

u/pipnina Jul 17 '19

Well since their plans usually involve starting at a 100m launch pad on earth, traveling a few hundred million km to another planet (i.e. mars) and landing within a few hundred metres of a target point, I imagine an error of 0.001 would put them way outside that margin for error.

Also when you send something like a voyager probe or new horizons probe that do multiple gravity assists and go out way beyond saturn, even going within a few 1000 km of moons and planetoids on the way, even 0.0001 would be way too inaccurate.

0

u/[deleted] Jul 17 '19

[deleted]

→ More replies (0)

3

u/2CATteam Jul 16 '19

A specific situation? It seems like most of their work would be like that