3 ms·
You can of course have some idea how floating point numbers work, but still not know how to bit twiddle abs(). I don't know what to take from the fact that Jav
by jrochkind1 5y ago
You can of course have some idea how floating point numbers work, but still not know how to bit twiddle abs().
I don't know what to take from the fact that Java stdlib didn't use it until Java 18? It does seem like it wasn't obvious to at least someone who knew something.
> If a similar article were written about how shifting an integer to the right by one bit is equivalent to dividing it by two, I highly suspect it would attract no attention on this site,
Nah, it would be full of comments of people saying "well of course I knew that! doesn't everyone who's anyone? I can't believe how many newbies don't though!" :)