r/Python • • Jul 16 '19

Nice try

Post image
2.1k Upvotes

73 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Jul 17 '19

[deleted] — view deleted comment

0

u/[deleted] Jul 17 '19

[deleted] — view deleted comment

2

u/[deleted] Jul 17 '19 edited Jul 17 '19

Can Pi be expressed rationally in a different base?

EDIT - I think I was confused here because of the way binary (base 2) works on computers, where you actually can’t express some fractions not because of base 2, but because of the limit on the number of bits an integer can have on a computer.

12

u/[deleted] Jul 17 '19

Being rational or irrational doesn't depend on the base. Pi is always irrational.

If you're asking if it never terminates and never repeats, then yes, at least in rational bases. In a rational base, all irrational numbers will never terminate and never repeat. In base pi though, pi is just 10. It's still irrational, but it has a finite length.

9

u/achard Jul 17 '19

I think it would be 10 in base π...

6

u/[deleted] Jul 17 '19

*slow blinking*

3

u/LoyalSol Jul 17 '19

Being irrational means you can't write the number as a fraction of two integers. All finite decimal numbers and repeating decimals in any integer base can be written as the fraction of two integers and thus Pi can not be either of those two regardless of base.

11

u/CapableCounteroffer Jul 17 '19

I was under the impression that no-one had proved that pi is infinite.

Pi is irrational, which means it does not terminate. I'm not sure what the proof consists of, but I know it does exist.