2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
12 .. index:: trigonometric function, cotangent
16 COTAN --- Cotangent function
17 ****************************
19 .. function:: COTAN(X)
21 ``COTAN(X)`` computes the cotangent of :samp:`{X}`. Equivalent to ``COS(x)``
22 divided by ``SIN(x)``, or ``1 / TAN(x)``.
25 The type shall be ``REAL`` or ``COMPLEX``.
28 The return value has same type and kind as :samp:`{X}`, and its value is in radians.
31 GNU extension, enabled with :option:`-fdec-math`.
37 .. code-block:: fortran
42 .. code-block:: fortran
45 real(8) :: x = 0.165_8
47 end program test_cotan