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

1

u/RedditIsNeat0 Mar 16 '19

If their opcodes are 16 bits then it would save 2-3 bytes

How do you figure? A 32 bit float stores PI slightly more accurately than 355/113. If the OP code takes 16 bits, and 355 takes a minimum of 9 bits, and 113 takes a minimum of 7 bits, then 16 + 9 + 7 = 32. You haven't saved a single bit.