Tangent Succession ================== It is know than the tangent of a given angle :math:`\theta` is equivalent to the following mathematical formula involving the sinus and consinus of the same angle: :math:`tan \theta = \sqrt{ \frac{1-cos(2\theta)}{1+cos(2\theta)} }` Implement the following two Python functions in the module :mod:`tangent` (file :file:`tangent.py`). ------------------------------------------------------------------------------------------------------------ The first function is: .. py:function:: tanf(a) such that **given** ``a``, a :class:`float` value with the angle in radians, ``a`` diferent than 1.5707963267948966 (equivent to 90 degrees). **returns** a :class:`float` with tangent of ``a`` calculated using the above formula, rounded to 4 decimals. For example: .. literalinclude:: tanf-test.txt :language: python3 :start-after: --ini :end-before: --fi .. note:: Python standard modules such as :mod:`math` **may** be imported and used. Doctests are available at the :download:`tanf-test.txt` file. ------------------------------------------------------------------------------------------------------------ The second function is: .. py:function:: tanf5(ad) such that **given** ``ad`` :class:`float` value with the angle in **degrees** **returns** the five :class:`float` values obtained by applying the previous function subsequently. That means that the function ``tanf`` is applied to given angle ``ad`` (properly converted into radians). Then the result obtained is used as input to ``tanf`` yielding the second value and so on. For example: .. literalinclude:: tanf5-test.txt :language: python3 :start-after: --ini :end-before: --fi .. warning:: This function implementation **must** call the previous function as many times as needed. Doctests for validation are available at the :download:`tanf5-test.txt` file.