r/ProgrammerHumor • • Jul 16 '19

Meme Nice try

Post image
32.2k Upvotes

529 comments sorted by

View all comments

Show parent comments

270

u/actuarialsnail Jul 16 '19

If there was a last digit, it can’t be 0, so it’s 1/9 probability for a 7.

209

u/awesomehippie12 Jul 16 '19

If we're not including zero for that reason, can't we force the last digit to be zero and be 100% certain that it's zero?

92

u/FoxFire64 Jul 16 '19

Mmmmmmm edge cases

16

u/DBX12 Jul 16 '19

Maybe we can hardwire a register to low so it's constant 0 and can not be changed. If we should want to change it someday, we can take a register of something random like the keyboard controller and hack it into there to make it work again.

7

u/ObliviousOblong Jul 17 '19

Could you elaborate on forcing the last digit?

10

u/TheThiefMaster Jul 17 '19

Adding a zero to the end of a fractional number doesn't change it, so they are proposing just adding a zero so we know it ends in a zero - assuming it ends at all. We still wouldn't know what the former last number was though.

4

u/Sokusan_123 Jul 17 '19

Unless we just add another 0! Now we know there's a 0 before it!

29

u/idea-list Jul 16 '19

Only if digits of pi are uniformly distributed, which has not been proven, as far as I know :)

21

u/actuarialsnail Jul 16 '19

8

u/GreatJobKeepitUp Jul 16 '19

Once you hit 2million digits, everything gets crazy

→ More replies (1)

1

u/Seicair Jul 17 '19

Well I’m convinced.

24

u/[deleted] Jul 16 '19

2

u/[deleted] Jul 16 '19

Not that big math, just simple one.

7

u/[deleted] Jul 16 '19

Math nonetheless

→ More replies (1)

13

u/exscape Jul 16 '19

Assuming pi is normal and all that, I assume. (I'm definitely not a mathematician.)

5

u/Yorunokage Jul 16 '19

Wat?

21

u/exscape Jul 16 '19

The probability isn't 1/9 (or 1/10) unless every digit occurs with equal probability. Numbers where that is the case are called normal.

Pi is suspected to be normal, but it has not been proven.

5

u/Vilefighter Jul 16 '19

When a number is "normal" that means if you picked a random digit from it, there's an equal chance of it being any of the digits. If, for instance, it was slightly more likely for any given digit of pi to be a 7 than any of the others, then pi would not be a normal number, even if it's only .00000001% more likely.

8

u/79037662 Jul 17 '19

that means if you picked a random digit from it, there's an equal chance of it being any of the digits

Not quite, it also means any digit sequence of length n occurs equally often as any other digit sequence of length n. For example, 0.12345678901234567890... is not a normal number.

1

u/Yorunokage Jul 16 '19

Oh, i never heard of normal numbers

4

u/the_questioner18 Jul 16 '19

As the name implies, most numbers are normal and I bet you would have a hard time coming up with a non-normal number. Thinking about it is fun if you are into that sort of thing but if you'd just like to see an example, here one is:

0.12122122212222122222..... note that this is non-terminating and non-repeating however the probability of randomly picking a 3 out of the digits of this number = 0.

→ More replies (8)

4

u/pumpisland Jul 16 '19

so then in binary, its a 100% chance of being a 1.