You cannot compute such functions "in P", or in any conventional complexity class for that matter, for the fundamenal reason that their inputs and outputs are real numbers that cannot be exactly represented in a computer.
You can compute approximations of elementary analytic functions to any given precision on rational inputs in the function class corresponding to uniform $\mathrm{TC}^0$ (and a fortiori in FP), as long as you take care that the output is not too large: i.e., in the case of $\exp$, the inputs are from a bounded domain so that the output cannot get exponentially large.
The same should hold for typical special functions, but this is an open-ended designation so it can't be answered definitively without specifying exactly what functions you mean. Generally speaking, analytic functions given by power series whose coefficients are $\mathrm{TC}^0$-computable (which any simple enough "formula" involving polynomials, powers, fractions, factorials, and the like is) can be approximated in $\mathrm{TC}^0$ on any compact subset of their domain of convergence.