3
<title>Elementary Functions - GNU Scientific Library -- Reference Manual</title>
4
<meta http-equiv="Content-Type" content="text/html">
5
<meta name="description" content="GNU Scientific Library -- Reference Manual">
6
<meta name="generator" content="makeinfo 4.8">
7
<link title="Top" rel="start" href="index.html#Top">
8
<link rel="up" href="Mathematical-Functions.html#Mathematical-Functions" title="Mathematical Functions">
9
<link rel="prev" href="Infinities-and-Not_002da_002dnumber.html#Infinities-and-Not_002da_002dnumber" title="Infinities and Not-a-number">
10
<link rel="next" href="Small-integer-powers.html#Small-integer-powers" title="Small integer powers">
11
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
13
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 The GSL Team.
15
Permission is granted to copy, distribute and/or modify this document
16
under the terms of the GNU Free Documentation License, Version 1.2 or
17
any later version published by the Free Software Foundation; with the
18
Invariant Sections being ``GNU General Public License'' and ``Free Software
19
Needs Free Documentation'', the Front-Cover text being ``A GNU Manual'',
20
and with the Back-Cover Text being (a) (see below). A copy of the
21
license is included in the section entitled ``GNU Free Documentation
24
(a) The Back-Cover Text is: ``You have freedom to copy and modify this
25
GNU Manual, like GNU software.''-->
26
<meta http-equiv="Content-Style-Type" content="text/css">
27
<style type="text/css"><!--
28
pre.display { font-family:inherit }
29
pre.format { font-family:inherit }
30
pre.smalldisplay { font-family:inherit; font-size:smaller }
31
pre.smallformat { font-family:inherit; font-size:smaller }
32
pre.smallexample { font-size:smaller }
33
pre.smalllisp { font-size:smaller }
34
span.sc { font-variant:small-caps }
35
span.roman { font-family:serif; font-weight:normal; }
36
span.sansserif { font-family:sans-serif; font-weight:normal; }
42
<a name="Elementary-Functions"></a>
43
Next: <a rel="next" accesskey="n" href="Small-integer-powers.html#Small-integer-powers">Small integer powers</a>,
44
Previous: <a rel="previous" accesskey="p" href="Infinities-and-Not_002da_002dnumber.html#Infinities-and-Not_002da_002dnumber">Infinities and Not-a-number</a>,
45
Up: <a rel="up" accesskey="u" href="Mathematical-Functions.html#Mathematical-Functions">Mathematical Functions</a>
49
<h3 class="section">4.3 Elementary Functions</h3>
51
<p>The following routines provide portable implementations of functions
52
found in the BSD math library. When native versions are not available
53
the functions described here can be used instead. The substitution can
54
be made automatically if you use <code>autoconf</code> to compile your
55
application (see <a href="Portability-functions.html#Portability-functions">Portability functions</a>).
58
— Function: double <b>gsl_log1p</b> (<var>const double x</var>)<var><a name="index-gsl_005flog1p-80"></a></var><br>
59
<blockquote><p><a name="index-log1p-81"></a><a name="index-logarithm_002c-computed-accurately-near-1-82"></a>This function computes the value of \log(1+x) in a way that is
60
accurate for small <var>x</var>. It provides an alternative to the BSD math
61
function <code>log1p(x)</code>.
62
</p></blockquote></div>
65
— Function: double <b>gsl_expm1</b> (<var>const double x</var>)<var><a name="index-gsl_005fexpm1-83"></a></var><br>
66
<blockquote><p><a name="index-expm1-84"></a><a name="index-exponential_002c-difference-from-1-computed-accurately-85"></a>This function computes the value of \exp(x)-1 in a way that is
67
accurate for small <var>x</var>. It provides an alternative to the BSD math
68
function <code>expm1(x)</code>.
69
</p></blockquote></div>
72
— Function: double <b>gsl_hypot</b> (<var>const double x, const double y</var>)<var><a name="index-gsl_005fhypot-86"></a></var><br>
73
<blockquote><p><a name="index-hypot-87"></a><a name="index-euclidean-distance-function_002c-hypot-88"></a><a name="index-length_002c-computed-accurately-using-hypot-89"></a>This function computes the value of
74
<!-- {$\sqrt{x^2 + y^2}$} -->
75
\sqrt{x^2 + y^2} in a way that avoids overflow. It provides an
76
alternative to the BSD math function <code>hypot(x,y)</code>.
77
</p></blockquote></div>
80
— Function: double <b>gsl_acosh</b> (<var>const double x</var>)<var><a name="index-gsl_005facosh-90"></a></var><br>
81
<blockquote><p><a name="index-acosh-91"></a><a name="index-hyperbolic-cosine_002c-inverse-92"></a><a name="index-inverse-hyperbolic-cosine-93"></a>This function computes the value of \arccosh(x). It provides an
82
alternative to the standard math function <code>acosh(x)</code>.
83
</p></blockquote></div>
86
— Function: double <b>gsl_asinh</b> (<var>const double x</var>)<var><a name="index-gsl_005fasinh-94"></a></var><br>
87
<blockquote><p><a name="index-asinh-95"></a><a name="index-hyperbolic-sine_002c-inverse-96"></a><a name="index-inverse-hyperbolic-sine-97"></a>This function computes the value of \arcsinh(x). It provides an
88
alternative to the standard math function <code>asinh(x)</code>.
89
</p></blockquote></div>
92
— Function: double <b>gsl_atanh</b> (<var>const double x</var>)<var><a name="index-gsl_005fatanh-98"></a></var><br>
93
<blockquote><p><a name="index-atanh-99"></a><a name="index-hyperbolic-tangent_002c-inverse-100"></a><a name="index-inverse-hyperbolic-tangent-101"></a>This function computes the value of \arctanh(x). It provides an
94
alternative to the standard math function <code>atanh(x)</code>.
95
</p></blockquote></div>
98
— Function: double <b>gsl_ldexp</b> (<var>double x, int e</var>)<var><a name="index-gsl_005fldexp-102"></a></var><br>
99
<blockquote><p><a name="index-ldexp-103"></a>This function computes the value of x * 2^e. It provides an
100
alternative to the standard math function <code>ldexp(x,e)</code>.
101
</p></blockquote></div>
104
— Function: double <b>gsl_frexp</b> (<var>double x, int * e</var>)<var><a name="index-gsl_005ffrexp-104"></a></var><br>
105
<blockquote><p><a name="index-frexp-105"></a>This function splits the number x into its normalized fraction
106
f and exponent e, such that x = f * 2^e and
107
<!-- {$0.5 \le f < 1$} -->
108
0.5 <= f < 1. The function returns f and stores the
109
exponent in e. If x is zero, both f and e
110
are set to zero. This function provides an alternative to the standard
111
math function <code>frexp(x, e)</code>.
112
</p></blockquote></div>