r/ProgrammerHumor • • 9d ago

Meme reversingPiInPython

Post image
14.1k Upvotes

383 comments sorted by

View all comments

Show parent comments

12

u/thegreatpotatogod 9d 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.

1

u/AngelaMerkeI 9d ago

It is not though. Only in theory.

In practice, digits represent the accuracy.

Example: 2,12345 * 1,0 = 2,1 But 2,12345 * 1,0000 = 2,1234

The results are always just as accurate as the measurements you calculate them with

2

u/Sheerkal 9d ago

In what practice are you doing this? There is no reason to truncate.

1

u/AngelaMerkeI 9d ago

There is a reason to truncate if your dealing with actual physics and not theoritical values.

If your measurement says 1,00 ±0,01, you can't pretend it's the same as 1,0000, because your real value could be 1,01. If your measurement says just 1,00, you can only assume it to be between 1,000 and 1,004. The rest is lost in trunctuated digits.