| <html lang="en"> |
| <head> |
| <title>Inverse Trig Functions - The GNU C Library</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="The GNU C Library"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="up" href="Mathematics.html#Mathematics" title="Mathematics"> |
| <link rel="prev" href="Trig-Functions.html#Trig-Functions" title="Trig Functions"> |
| <link rel="next" href="Exponents-and-Logarithms.html#Exponents-and-Logarithms" title="Exponents and Logarithms"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <!-- |
| This file documents the GNU C library. |
| |
| This is Edition 0.12, last updated 2007-10-27, |
| of `The GNU C Library Reference Manual', for version |
| 2.8 (Sourcery G++ Lite 2011.03-41). |
| |
| Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, |
| 2003, 2007, 2008, 2010 Free Software Foundation, Inc. |
| |
| Permission is granted to copy, distribute and/or modify this document |
| under the terms of the GNU Free Documentation License, Version 1.3 or |
| any later version published by the Free Software Foundation; with the |
| Invariant Sections being ``Free Software Needs Free Documentation'' |
| and ``GNU Lesser General Public License'', the Front-Cover texts being |
| ``A GNU Manual'', and with the Back-Cover Texts as in (a) below. A |
| copy of the license is included in the section entitled "GNU Free |
| Documentation License". |
| |
| (a) The FSF's Back-Cover Text is: ``You have the freedom to |
| copy and modify this GNU manual. Buying copies from the FSF |
| supports it in developing GNU and promoting software freedom.''--> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| <link rel="stylesheet" type="text/css" href="../cs.css"> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="Inverse-Trig-Functions"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="Exponents-and-Logarithms.html#Exponents-and-Logarithms">Exponents and Logarithms</a>, |
| Previous: <a rel="previous" accesskey="p" href="Trig-Functions.html#Trig-Functions">Trig Functions</a>, |
| Up: <a rel="up" accesskey="u" href="Mathematics.html#Mathematics">Mathematics</a> |
| <hr> |
| </div> |
| |
| <h3 class="section">19.3 Inverse Trigonometric Functions</h3> |
| |
| <p><a name="index-inverse-trigonometric-functions-2108"></a> |
| These are the usual arc sine, arc cosine and arc tangent functions, |
| which are the inverses of the sine, cosine and tangent functions |
| respectively. |
| |
| <!-- math.h --> |
| <!-- ISO --> |
| <div class="defun"> |
| — Function: double <b>asin</b> (<var>double x</var>)<var><a name="index-asin-2109"></a></var><br> |
| <blockquote><!-- math.h --> |
| <!-- ISO --> |
| — Function: float <b>asinf</b> (<var>float x</var>)<var><a name="index-asinf-2110"></a></var><br> |
| <blockquote><!-- math.h --> |
| <!-- ISO --> |
| — Function: long double <b>asinl</b> (<var>long double x</var>)<var><a name="index-asinl-2111"></a></var><br> |
| <blockquote><p>These functions compute the arc sine of <var>x</var>—that is, the value whose |
| sine is <var>x</var>. The value is in units of radians. Mathematically, |
| there are infinitely many such values; the one actually returned is the |
| one between <code>-pi/2</code> and <code>pi/2</code> (inclusive). |
| |
| <p>The arc sine function is defined mathematically only |
| over the domain <code>-1</code> to <code>1</code>. If <var>x</var> is outside the |
| domain, <code>asin</code> signals a domain error. |
| </p></blockquote></div> |
| |
| <!-- math.h --> |
| <!-- ISO --> |
| <div class="defun"> |
| — Function: double <b>acos</b> (<var>double x</var>)<var><a name="index-acos-2112"></a></var><br> |
| <blockquote><!-- math.h --> |
| <!-- ISO --> |
| — Function: float <b>acosf</b> (<var>float x</var>)<var><a name="index-acosf-2113"></a></var><br> |
| <blockquote><!-- math.h --> |
| <!-- ISO --> |
| — Function: long double <b>acosl</b> (<var>long double x</var>)<var><a name="index-acosl-2114"></a></var><br> |
| <blockquote><p>These functions compute the arc cosine of <var>x</var>—that is, the value |
| whose cosine is <var>x</var>. The value is in units of radians. |
| Mathematically, there are infinitely many such values; the one actually |
| returned is the one between <code>0</code> and <code>pi</code> (inclusive). |
| |
| <p>The arc cosine function is defined mathematically only |
| over the domain <code>-1</code> to <code>1</code>. If <var>x</var> is outside the |
| domain, <code>acos</code> signals a domain error. |
| </p></blockquote></div> |
| |
| <!-- math.h --> |
| <!-- ISO --> |
| <div class="defun"> |
| — Function: double <b>atan</b> (<var>double x</var>)<var><a name="index-atan-2115"></a></var><br> |
| <blockquote><!-- math.h --> |
| <!-- ISO --> |
| — Function: float <b>atanf</b> (<var>float x</var>)<var><a name="index-atanf-2116"></a></var><br> |
| <blockquote><!-- math.h --> |
| <!-- ISO --> |
| — Function: long double <b>atanl</b> (<var>long double x</var>)<var><a name="index-atanl-2117"></a></var><br> |
| <blockquote><p>These functions compute the arc tangent of <var>x</var>—that is, the value |
| whose tangent is <var>x</var>. The value is in units of radians. |
| Mathematically, there are infinitely many such values; the one actually |
| returned is the one between <code>-pi/2</code> and <code>pi/2</code> (inclusive). |
| </p></blockquote></div> |
| |
| <!-- math.h --> |
| <!-- ISO --> |
| <div class="defun"> |
| — Function: double <b>atan2</b> (<var>double y, double x</var>)<var><a name="index-atan2-2118"></a></var><br> |
| <blockquote><!-- math.h --> |
| <!-- ISO --> |
| — Function: float <b>atan2f</b> (<var>float y, float x</var>)<var><a name="index-atan2f-2119"></a></var><br> |
| <blockquote><!-- math.h --> |
| <!-- ISO --> |
| — Function: long double <b>atan2l</b> (<var>long double y, long double x</var>)<var><a name="index-atan2l-2120"></a></var><br> |
| <blockquote><p>This function computes the arc tangent of <var>y</var>/<var>x</var>, but the signs |
| of both arguments are used to determine the quadrant of the result, and |
| <var>x</var> is permitted to be zero. The return value is given in radians |
| and is in the range <code>-pi</code> to <code>pi</code>, inclusive. |
| |
| <p>If <var>x</var> and <var>y</var> are coordinates of a point in the plane, |
| <code>atan2</code> returns the signed angle between the line from the origin |
| to that point and the x-axis. Thus, <code>atan2</code> is useful for |
| converting Cartesian coordinates to polar coordinates. (To compute the |
| radial coordinate, use <code>hypot</code>; see <a href="Exponents-and-Logarithms.html#Exponents-and-Logarithms">Exponents and Logarithms</a>.) |
| |
| <!-- This is experimentally true. Should it be so? -zw --> |
| <p>If both <var>x</var> and <var>y</var> are zero, <code>atan2</code> returns zero. |
| </p></blockquote></div> |
| |
| <p><a name="index-inverse-complex-trigonometric-functions-2121"></a>ISO C99<!-- /@w --> defines complex versions of the inverse trig functions. |
| |
| <!-- complex.h --> |
| <!-- ISO --> |
| <div class="defun"> |
| — Function: complex double <b>casin</b> (<var>complex double z</var>)<var><a name="index-casin-2122"></a></var><br> |
| <blockquote><!-- complex.h --> |
| <!-- ISO --> |
| — Function: complex float <b>casinf</b> (<var>complex float z</var>)<var><a name="index-casinf-2123"></a></var><br> |
| <blockquote><!-- complex.h --> |
| <!-- ISO --> |
| — Function: complex long double <b>casinl</b> (<var>complex long double z</var>)<var><a name="index-casinl-2124"></a></var><br> |
| <blockquote><p>These functions compute the complex arc sine of <var>z</var>—that is, the |
| value whose sine is <var>z</var>. The value returned is in radians. |
| |
| <p>Unlike the real-valued functions, <code>casin</code> is defined for all |
| values of <var>z</var>. |
| </p></blockquote></div> |
| |
| <!-- complex.h --> |
| <!-- ISO --> |
| <div class="defun"> |
| — Function: complex double <b>cacos</b> (<var>complex double z</var>)<var><a name="index-cacos-2125"></a></var><br> |
| <blockquote><!-- complex.h --> |
| <!-- ISO --> |
| — Function: complex float <b>cacosf</b> (<var>complex float z</var>)<var><a name="index-cacosf-2126"></a></var><br> |
| <blockquote><!-- complex.h --> |
| <!-- ISO --> |
| — Function: complex long double <b>cacosl</b> (<var>complex long double z</var>)<var><a name="index-cacosl-2127"></a></var><br> |
| <blockquote><p>These functions compute the complex arc cosine of <var>z</var>—that is, the |
| value whose cosine is <var>z</var>. The value returned is in radians. |
| |
| <p>Unlike the real-valued functions, <code>cacos</code> is defined for all |
| values of <var>z</var>. |
| </p></blockquote></div> |
| |
| <!-- complex.h --> |
| <!-- ISO --> |
| <div class="defun"> |
| — Function: complex double <b>catan</b> (<var>complex double z</var>)<var><a name="index-catan-2128"></a></var><br> |
| <blockquote><!-- complex.h --> |
| <!-- ISO --> |
| — Function: complex float <b>catanf</b> (<var>complex float z</var>)<var><a name="index-catanf-2129"></a></var><br> |
| <blockquote><!-- complex.h --> |
| <!-- ISO --> |
| — Function: complex long double <b>catanl</b> (<var>complex long double z</var>)<var><a name="index-catanl-2130"></a></var><br> |
| <blockquote><p>These functions compute the complex arc tangent of <var>z</var>—that is, |
| the value whose tangent is <var>z</var>. The value is in units of radians. |
| </p></blockquote></div> |
| |
| </body></html> |
| |