At the moment i need to compute sine and cosine based of tangent function. To solving this problem, I found the Tangent half-angle formula: $$\sin {\alpha}= \frac{2 \tan{\frac{\alpha}{2}}}{1+\tan^2{\frac{\alpha}{2}}}$$ $$\cos {\alpha}= \frac{1- \tan^2{\frac{\alpha}{2}}}{1+\tan^2{\frac{\alpha}{2}}}$$ We cannot use it for compute $\sin \pi$ and $\cos \pi$(becouse $\tan \frac{\pi}{2}$ is it impossible).
How to modify this formulas for resolve this problem?
In both cases the left and right limits as $\alpha\to\pi$ exist, so the formulas can be assumed to work in that sense.