Hacker's Delight is a great little book about math and programming. The blurb:
A collection useful programming advice the author has collected over the years; small algorithms that make the programmer's task easier. At long last, proven short-cuts to mastering difficult aspects of computer programming. Learn to program at a more advanced level than is generally taught in schools and training courses, and much more advanced than can be learned through individual study/experience. An instant cult classic for programmers!