]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/doc/gfortran/intrinsic-procedures/tand.rst
sphinx: copy files from texi2rst-generated repository
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / tand.rst
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 .. _tand:
7
8 .. index:: TAND
9
10 .. index:: DTAND
11
12 .. index:: trigonometric function, tangent, degrees
13
14 .. index:: tangent, degrees
15
16 TAND --- Tangent function, degrees
17 **********************************
18
19 .. function:: TAND(X)
20
21 ``TAND(X)`` computes the tangent of :samp:`{X}` in degrees.
22
23 :param X:
24 The type shall be ``REAL`` or ``COMPLEX``.
25
26 :return:
27 The return value has same type and kind as :samp:`{X}`, and its value is in degrees.
28
29 Standard:
30 GNU extension, enabled with :option:`-fdec-math`.
31
32 Class:
33 Elemental function
34
35 Syntax:
36 .. code-block:: fortran
37
38 RESULT = TAND(X)
39
40 Example:
41 .. code-block:: fortran
42
43 program test_tand
44 real(8) :: x = 0.165_8
45 x = tand(x)
46 end program test_tand
47
48 Specific names:
49 .. list-table::
50 :header-rows: 1
51
52 * - Name
53 - Argument
54 - Return type
55 - Standard
56
57 * - ``TAND(X)``
58 - ``REAL(4) X``
59 - ``REAL(4)``
60 - GNU extension
61 * - ``DTAND(X)``
62 - ``REAL(8) X``
63 - ``REAL(8)``
64 - GNU extension
65
66 See also:
67 Inverse function:
68 :ref:`ATAND`
69 Radians function:
70 :ref:`TAN`