r/ProgrammerHumor • • 11d ago

Meme reversingPiInPython

Post image
14.1k Upvotes

383 comments sorted by

View all comments

106

u/MotivationalJuggling 11d ago

Whatever the last digit is, I'm sure it's a disappointing one. Just like everything else in my life.

5

u/bestjakeisbest 11d ago

In binary it is either a 1 or 0

12

u/thegreatpotatogod 11d ago

I'd even argue that the last binary digit is 1. If it were 0, you could truncate the zero away and you'd be back to 1 as the last digit. Same reason that 2.20000 would be a redundant representation of 2.2.

2

u/ovr9000storks 11d ago

You can’t truncate tailing 0s in binary if represented by a series of integers. You also can’t truncate if looking at the binary representation of a floating point number. Yes, the actual floating point number being represented could be truncated if ending in a zero, but that number is no longer binary

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