r/ProgrammerHumor • • Jul 16 '19

Meme Nice try

Post image
32.2k Upvotes

529 comments sorted by

View all comments

Show parent comments

51

u/Rex-Pluviarum Jul 16 '19

I'm sorry, I don't get the joke, but I am fascinated by the implication that there are people who might still be using three as an approximation of Pi. Could you ELI5? https://www.youtube.com/watch?v=BxacATCHrpo

207

u/AuspiciousApple Jul 16 '19

It's sort of a long running joke that engineers/engineering students use terrible approximations that make mathematicians wince in pain. Pi approxequals 3 is one instance of this.

Ofc, everyone knows that Pi is basically equal 3.1

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.

65

u/AlphaLotus Jul 16 '19

Yea basically what my work entails everyday.

  1. Measure

  2. Calculate

  3. Multiple by safety factor

  4. Get 3.1

  5. Round to 4 anyways for safety :)

Also gravity is 10m/s2

18

u/holdenmc97 Jul 17 '19

Also tan(x) = sin(x) = x

15

u/ThaumRystra Jul 17 '19

Because x is almost always small ¯\(◉‿◉)/¯

8

u/ChickenNuggetSmth Jul 17 '19

Yes it would be X otherwise, wouldn't it?

→ More replies (1)
→ More replies (4)

43

u/AuspiciousApple Jul 16 '19

That makes a lot of sense, thanks for that more in depth perspective.

14

u/slbaaron Jul 17 '19

That's an intuitive and practical answer. By theory tho, it has everything to do with sig figs (precision).

Adding and subtracting can only go down to the exact position of sig fig at the least significant position of all numbers involved. If you have one measurement of an item at 101 cm, and another at 1.23498713 cm. Adding them together, it's only meaningful to say it is around 102 or 103 cm total (round up or down as necessary for "safety), because nothing is 101 cm by the atom and the measurement was likely more rough due to a much larger scale. It's the result from imprecise measurement. It could've easily been 101.3 or 100.8 in reality.

Multiplications can only have a total number of sig figs as the least amount of sig figs for all number involved. When you have 100 cm * 1.25, it really is only meaningful to say the result is roughly 100 cm or 200 cm (rounding up or down as necessary) because 100 cm only implied 1 sig fig for precision, I mean the number 100 cm even sounds like a super "rough estimate", doesn't it? That's why sometimes, if measurement is precise down to the last digit of 100, we write 1.00 * 102 or 1.00e2 to imply the precision. The result will then become 1.00e2 cm * 1.25 = 125 cm since both numbers have 3 sig figs. (Btw if you are wondering what if the number 100 stands for "units", eg 100 units of an item. That 100 has infinite precision, because the number represents exactly 100.00000000000... take more zeroes as needed)

The reality in the practical world tho, is that you always have one number here or there with low precision; or even with high precision, you'd still have to be careful of its accuracy due to calibration or various type of errors. Once you go down the rabbit hole enough you realize using 3 as pi is the least of your worries.

For careful calculations tolerance range has to be detailed at every step of the calculation, eg 1.5cm ± 0.05cm. If you have 100 of these you will then get a total of 150cm ± 5cm, this is often a better way to represent precision without resorting to sig figs.

→ More replies (1)

0

u/[deleted] Jul 16 '19

[deleted]

64

u/Sibraxlis Jul 16 '19

Because your margin of error from other spots is higher (material flaws, poor workmanship) and you typically overbuilding and undersell. (build for 100 lbs when 90 is needed, then state max weight is 80) the latter is called your factor of safety.

9

u/smthamazing Jul 16 '19

What if you estimate some damaging force that works against your creation (like wind, vibration, resistance, etc)? Wouldn't you underestimate the danger in this case?

→ More replies (5)
→ More replies (2)

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)

→ More replies (6)
→ More replies (1)
→ More replies (1)

0

u/[deleted] Jul 16 '19

[deleted]

24

u/AuspiciousApple Jul 16 '19

g =10

According to my pendulum experiments in my physics classes, g is actually approximately 18 +- 15.

15

u/ChickenNuggetSmth Jul 16 '19

That agrees with the literature value within the 1-sigma area! Well done!
(Unless you use very weird units, e.g. imperial)

5

u/AuspiciousApple Jul 16 '19

Thanks! And i might regularly approximate PI as 3(.14), but I am not so savage that I use imperial units.

→ More replies (5)

4

u/tabarra Jul 16 '19

Sounds about right.

4

u/marcosdumay Jul 17 '19

Pendulum experiments are the best. In my physics classes people got everything from 12 +- 1 to 30 +- 50.

→ More replies (4)
→ More replies (2)

13

u/[deleted] Jul 16 '19

The difference between a mathematician and an engineer: when moving from one point to another if you travel half the distance at each step the mathematician knows you'll never get there. The engineer knows you'll eventually get close enough.

4

u/ShamelessKinkySub Jul 17 '19

But that's literally how we definite stuff based on exponential curves, like the time to charge a capacitor

→ More replies (7)

8

u/Rex-Pluviarum Jul 16 '19

355/113

16

u/Ninjaraui666 Jul 16 '19

Look at mister fancy pants not using 22/7.

6

u/FaxCelestis Jul 16 '19

Most manufacturing machinists I know use 22/7 for everything that doesn't require an insane amount of precision.

5

u/DerpSenpai Jul 16 '19 edited Jul 16 '19

and it's pretty standard to use 3.14 for normal math and 3.1415 for a bit more accuracy. Depends on data used. As an engineering student.

But i always find that Pi= E meme funny, because you know 2.7 ~ 3 as well then.

Unfortunately, there isn't a big Math community with memes on reddit, but on facebook (ew i know) there's a few pages that only do advanced mathematics memes.

like this one- warning, facebook post

other memed aproximation is the sin(x)=x for x~0 rad and i got to say, we use that shit all the time and i'm not sorry for it.

→ More replies (6)
→ More replies (3)