I say learn whatever is interesting and of course applicable to whatever you're working toward at the moment. If you plan to make 3-D games for example then things like matrices and physics equations might be good things to study. And pretty much everywhere you turn in programming lurks some form of mathematical problem to be solved, refined, and/or optimized. So you'll learn a lot along the way too.