That was a nice question Brad!What these guys above are saying is that even thought, as you argued, there is a function that does that, in general there is no "nice" equation for it.
The "no nice function equation" is in fact a common occurrence in mathematics. The 'solution' for that is to find a simpler function that approximates the "ugly" function or to make some computer program/algorithm that gives good approximations of it.
These "approximation methods" have lots of nice ideas actually, and you are going to see some of them if you do a calculus course.
Ricardo