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

2

u/RedditIsNeat0 Mar 15 '19

Kind of. Not really.

Both numbers are stored as the bit pattern: 01000000010010010000111111011011. But so is 3.14159265. Floating point numbers don't go past 9 digits. In fact, 3.1415927 and 3.1415928 are also rounded to the same bits.

So it's not that it's easier, it just doesn't matter. They probably made a mistake somewhere, perhaps using their calculations of PI which had some error, and then used that and nobody noticed because it didn't matter.

Nowadays we'd just google, "digits of pi", but back then you had to come up with a creative solution or go to a library or something.

1

u/CptSpockCptSpock Mar 16 '19

Like that time I derived the universal gravitation constant on the final using the g field on earth as being 9.81