All of the comments here seem to be of the form "I'd like to learn Math". However, it's a pretty huge subject! The topics to study really depend on the programming task. The best introductory book on University style Mathematics from the above range is: http://www.springer.com/west/home/math/analysis?SGWID=4-1004...
I've spent most of my years coding solver libraries in C++. I am interested mainly in solving Ordinary and Partial Differential Equations, which require a good knowledge of numerical integration techniques. The prerequesites include Real Analysis, Linear Algebra (for the matrix solvers) and Numerical Analysis, for instance.
The best way that I've found to learn a new mathematical topic (or indeed a new programming language) is to give myself a really cool project which requires knowledge of it and then figure out a solution. I used to read Math books on the bus into University, but you just don't get the same level of knowledge that you would if you were making a fun bit of software that needed it.
A great example here is to program your own 3D engine, without using a 3D API! There is no way you would be able to compete with DirectX or OpenGL for quality, but the underlying mathematical knowledge of the graphics pipeline will give you a much better understanding of how the "big" APIs work. It's also great fun too!