]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/doc/gfortran/intrinsic-procedures/cotand.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / cotand.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.. _cotand:
7
8.. index:: COTAND
9
10.. index:: DCOTAND
11
12.. index:: trigonometric function, cotangent, degrees
13
14.. index:: cotangent, degrees
15
16COTAND --- Cotangent function, degrees
17**************************************
18
19.. function:: COTAND(X)
20
21 ``COTAND(X)`` computes the cotangent of :samp:`{X}` in degrees. Equivalent to
22 ``COSD(x)`` divided by ``SIND(x)``, or ``1 / TAND(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 degrees.
29
30 Standard:
31 GNU extension, enabled with :option:`-fdec-math`.
32
33 This function is for compatibility only and should be avoided in favor of
34 standard constructs wherever possible.
35
36 Class:
37 Elemental function
38
39 Syntax:
40 .. code-block:: fortran
41
42 RESULT = COTAND(X)
43
44 Example:
45 .. code-block:: fortran
46
47 program test_cotand
48 real(8) :: x = 0.165_8
49 x = cotand(x)
50 end program test_cotand
51
52 Specific names:
53 .. list-table::
54 :header-rows: 1
55
56 * - Name
57 - Argument
58 - Return type
59 - Standard
60
61 * - ``COTAND(X)``
62 - ``REAL(4) X``
63 - ``REAL(4)``
64 - GNU extension
65 * - ``DCOTAND(X)``
66 - ``REAL(8) X``
67 - ``REAL(8)``
68 - GNU extension
69
70 See also:
71 Converse function:
72 :ref:`TAND`
73 Radians function:
3ed1b4ce 74 :ref:`COTAN`