Here are 3 good places to find bit manipulation hacks and efficient low level algorithms for various mathematical functions:

Bit Twiddling Hacks (Stanford)
The Aggregate Magic Algorithms (University of Kentucky)
HAKMEM (MIT)

If you have other ones like this, do not hesitate to post them in the comments !