Talk:3062: Off By One
But what about floats? GreyFox (talk) 20:01, 12 March 2025 (UTC)
Is this dithering? Hcs (talk) 21:19, 12 March 2025 (UTC)
This language has a huge off by one error: the docs don't explicitly say if the random range is inclusive. --Snaxmcgee (talk) 22:22, 12 March 2025 (UTC)
But if it's adjusted both on store and on read, then there is a chance (of about 1 in 22) that the value after read will be exactly the same as the value before store. This does not eliminate pre-existing off-by-one errors, and in fact, introduces new ones if the adjustment on read is off by one from the adjustment on store, when there was no off-by-one error in the original code. And what's worse - with a single store-read cycle, the value can never be off by 40 to 50. It can be off by up to 10, or by between 80 to 100, in either direction. --172.70.243.136 22:40, 12 March 2025 (UTC)
