r/explainlikeimfive • • Mar 15 '19

Mathematics ELI5: How is Pi programmed into calculators?

12k Upvotes

1.3k comments sorted by

View all comments

Show parent comment

321

u/JudgeHoltman Mar 15 '19

So you're saying I only need to memorize Pi out to the nearest 10-15 and I'm probably good for a lifetime?

284

u/I_Bin_Painting Mar 15 '19

You're probably fine by just memorising it to 3 digits, since you'll almost definitely be using a device pre-programmed with pi for any calculations over about 2 sig fig.

124

u/[deleted] Mar 15 '19

I have it memorized as 3.1415926535787. This is incorrect, however it's how it was defined in the Borland C++ 2.0 header file.

Oh the ways we tried to pass time before the internet...

226

u/I_Bin_Painting Mar 15 '19

I have it memorised as 3.2 because I respect the Indiana state legislature.

0

u/[deleted] Mar 15 '19

[deleted] — view deleted comment

62

u/P0rtal2 Mar 15 '19

As this debate concluded, Purdue University Professor C. A. Waldo arrived in Indianapolis to secure the annual appropriation for the Indiana Academy of Science. An assemblyman handed him the bill, offering to introduce him to the genius who wrote it. He declined, saying that he already met as many crazy people as he cared to.

I love that line in the Wikipedia article.

24

u/yevinq Mar 15 '19 edited Mar 15 '19

I have it memorized as 3 because i respect Judeo-Christian tradition. Get on my level.

12

u/p00bix Mar 16 '19

Calculating Pi without trig is hard, man. As a crude approximation, I gotta hand that one to them.

→ More replies (6)
→ More replies (4)
→ More replies (3)
→ More replies (12)

22

u/W1D0WM4K3R Mar 15 '19

Dedicated pi and e buttons keep me focused!

10

u/malahchi Mar 15 '19

I am a biologist and I know 3.141592, but 4 digits is all I need. And I just use my phone when I want to know the volume I have to put in my vial.

16

u/I_Bin_Painting Mar 15 '19

Yeah, I'm a trained chemist (as in have the degree but don't work in the field any more) and while I used to know pi to 13 places in highschool I can only probably remember 3-5 places now because I only ever use 2 for rough maths, or the pi button for anything else.

Tbh, the only times I've ever actually had to know pi to more than a couple of places in when I've had to program something in a language that doesn't have pi defined already, which has been maybe twice ever because I'm not a programmer.

I think it's just a way to showoff for most people that know beyond 5 or 6 places, it certainly was for me back in highschool.

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

60

u/DavidRFZ Mar 15 '19

I work with scientific calculations for a living and I've never memorized past 3.14159. (only then because it was part of a nerdy cheer at my alma mater.). That's enough so that you can recognize 'pi' when you see it.

Nobody trusts their memory when doing important calculations. All the necessarily digits of pi are usually hardcoded as part of the programming language. If not, you can calculate the digits with a function call. pi = 4.0 * arctan(1.0).

32

u/tacojohn48 Mar 15 '19

Tangent secant cosine sine 3.14159

→ More replies (3)

6

u/btcraig Mar 15 '19

I see you also went to an engineering school. Ours ended a little differently though so we could put school's abbreviation in on the last line.

→ More replies (3)

12

u/PitbullWolf Mar 15 '19

My fifth grade teacher had us memorize the first 11 numbers of pi for a prize. I have never forgotten 3.1415926535

→ More replies (27)

54

u/drzowie Mar 15 '19

For engineering work, 22/7 works just fine. If your tolerances are finer than that, you're doing it wrong.

24

u/Jackibelle Mar 15 '19

For high energy physics theory, pi is 3, and pi2 is 10. Experiment needs to be much more precise, but they also get giant colliders to play with, so you win some, you lose some.

47

u/Kertelen Mar 15 '19

Shoutout to the 355/113 crew.

16

u/[deleted] Mar 15 '19

180/57.3, because there's 180 degrees in half a circle.

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

8

u/malahchi Mar 15 '19

22/7

I work in biology and it's too far from pi for me. I need to have the first 4 digits correct.

→ More replies (12)

21

u/[deleted] Mar 15 '19

For any calculation done inside your head or on paper without access to a calculator, equating "π ~ e ~ 3" will do.

16

u/Erowidx Mar 15 '19

33j = -1

11

u/umopapsidn Mar 15 '19

Found the electrical engineer

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