]>
Commit | Line | Data |
---|---|---|
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 | .. _sin: | |
7 | ||
8 | .. index:: SIN | |
9 | ||
10 | .. index:: DSIN | |
11 | ||
12 | .. index:: CSIN | |
13 | ||
14 | .. index:: ZSIN | |
15 | ||
16 | .. index:: CDSIN | |
17 | ||
18 | .. index:: trigonometric function, sine | |
19 | ||
20 | .. index:: sine | |
21 | ||
22 | SIN --- Sine function | |
23 | ********************** | |
24 | ||
25 | .. function:: SIN(X) | |
26 | ||
27 | ``SIN(X)`` computes the sine of :samp:`{X}`. | |
28 | ||
29 | :param X: | |
30 | The type shall be ``REAL`` or | |
31 | ``COMPLEX``. | |
32 | ||
33 | :return: | |
34 | The return value has same type and kind as :samp:`{X}`. | |
35 | ||
36 | Standard: | |
37 | Fortran 77 and later | |
38 | ||
39 | Class: | |
40 | Elemental function | |
41 | ||
42 | Syntax: | |
43 | .. code-block:: fortran | |
44 | ||
45 | RESULT = SIN(X) | |
46 | ||
47 | Example: | |
48 | .. code-block:: fortran | |
49 | ||
50 | program test_sin | |
51 | real :: x = 0.0 | |
52 | x = sin(x) | |
53 | end program test_sin | |
54 | ||
55 | Specific names: | |
56 | .. list-table:: | |
57 | :header-rows: 1 | |
58 | ||
59 | * - Name | |
60 | - Argument | |
61 | - Return type | |
62 | - Standard | |
63 | ||
64 | * - ``SIN(X)`` | |
65 | - ``REAL(4) X`` | |
66 | - ``REAL(4)`` | |
67 | - Fortran 77 and later | |
68 | * - ``DSIN(X)`` | |
69 | - ``REAL(8) X`` | |
70 | - ``REAL(8)`` | |
71 | - Fortran 77 and later | |
72 | * - ``CSIN(X)`` | |
73 | - ``COMPLEX(4) X`` | |
74 | - ``COMPLEX(4)`` | |
75 | - Fortran 77 and later | |
76 | * - ``ZSIN(X)`` | |
77 | - ``COMPLEX(8) X`` | |
78 | - ``COMPLEX(8)`` | |
79 | - GNU extension | |
80 | * - ``CDSIN(X)`` | |
81 | - ``COMPLEX(8) X`` | |
82 | - ``COMPLEX(8)`` | |
83 | - GNU extension | |
84 | ||
85 | See also: | |
86 | Inverse function: | |
87 | :ref:`ASIN` | |
88 | Degrees function: | |
3ed1b4ce | 89 | :ref:`SIND` |