Question is pretty self-explanatory. I\'ve seen a couple of examples for pi but not for trigo functions. Maybe one could use a Taylor series as done here but I\'m not entire
mpmath is the way:
from mpmath import mp
precision = 1000000
mp.dps = precision
mp.cos(0.1)
If unable to install mpmath or any other module you could try polynomial approximation as suggested.
where Rn is the Lagrange Remainder
Note that Rn grows fast as soon as x moves away from the center x0, so be careful using Maclaurin series (Taylor series centered in 0) when trying to calculate sin(x) or cos(x) of arbitrary x.