Tales of the truly nerdy
Sep. 7th, 2006 08:38 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
In C, perl, Python and probably every modern computer language
So here's the nerdy part.
I searched various open source programs on the net until I found one that had "digits << digits - digits" until I found one. I then submitted a bug report to the author asking if he had intended "(digits << digits ) - digits. He had, and thanked me for the correction.
I had never used the software, nor did I even understand what it did.
1 << 16 - 1looks like it should give the highest value an unsigned 16-bit int can store, but it doesn't: That would be
(1 << 16) - 1because without parens the “16-1” is done first, and you get “(1 << 15)".
So here's the nerdy part.
I searched various open source programs on the net until I found one that had "digits << digits - digits" until I found one. I then submitted a bug report to the author asking if he had intended "(digits << digits ) - digits. He had, and thanked me for the correction.
I had never used the software, nor did I even understand what it did.