]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/doc/gfortran/intrinsic-procedures/cotan.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / cotan.rst
CommitLineData
c63539ff
ML
1..
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.
5
6.. _cotan:
7
8.. index:: COTAN
9
10.. index:: DCOTAN
11
12.. index:: trigonometric function, cotangent
13
14.. index:: cotangent
15
16COTAN --- Cotangent function
17****************************
18
19.. function:: COTAN(X)
20
21 ``COTAN(X)`` computes the cotangent of :samp:`{X}`. Equivalent to ``COS(x)``
22 divided by ``SIN(x)``, or ``1 / TAN(x)``.
23
24 :param X:
25 The type shall be ``REAL`` or ``COMPLEX``.
26
27 :return:
28 The return value has same type and kind as :samp:`{X}`, and its value is in radians.
29
30 Standard:
31 GNU extension, enabled with :option:`-fdec-math`.
32
33 Class:
34 Elemental function
35
36 Syntax:
37 .. code-block:: fortran
38
39 RESULT = COTAN(X)
40
41 Example:
42 .. code-block:: fortran
43
44 program test_cotan
45 real(8) :: x = 0.165_8
46 x = cotan(x)
47 end program test_cotan
48
49 Specific names:
50 .. list-table::
51 :header-rows: 1
52
53 * - Name
54 - Argument
55 - Return type
56 - Standard
57
58 * - ``COTAN(X)``
59 - ``REAL(4) X``
60 - ``REAL(4)``
61 - GNU extension
62 * - ``DCOTAN(X)``
63 - ``REAL(8) X``
64 - ``REAL(8)``
65 - GNU extension
66
67 See also:
68 Converse function:
69 :ref:`TAN`
70 Degrees function:
3ed1b4ce 71 :ref:`COTAND`