I find that what many people think of when they think of "math" is really just calculating (solve for this variable, optimize this curve, etc.)---what I like to call end-user math or craft-math. It's more akin to cooking or repairing an engine than it is to writing software. The other kind of math, the real kind, if you will, is proof writing. It's a creative process, both goal-oriented and expository, and subject to principles of elegance and efficiency. All of these features it has in common with software development.