C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
l_rmath.inl
1 /*
2 ** CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4)
3 **
4 ** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik,
5 ** Universitaet Karlsruhe, Germany
6 ** (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie
7 ** Universitaet Wuppertal, Germany
8 **
9 ** This library is free software; you can redistribute it and/or
10 ** modify it under the terms of the GNU Library General Public
11 ** License as published by the Free Software Foundation; either
12 ** version 2 of the License, or (at your option) any later version.
13 **
14 ** This library is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ** Library General Public License for more details.
18 **
19 ** You should have received a copy of the GNU Library General Public
20 ** License along with this library; if not, write to the Free
21 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23 
24 /* CVS $Id: l_rmath.inl,v 1.30 2014/01/30 17:23:46 cxsc Exp $ */
25 
26 #include "l_interval.hpp"
27 #include "l_imath.hpp"
28 
29 namespace cxsc {
30 
31 inline l_real sqr(const l_real &x) throw()
32  { return (x*x); }
33 inline l_real sqrt(const l_real & x,int n)
34  { return mid(sqrt(_l_interval(x),n)); }
35 inline l_real sqrtp1m1(const l_real & x) throw()
36  { return mid(sqrtp1m1(_l_interval(x))); }
37 inline l_real sqrtx2m1(const l_real & x) throw()
38  { return mid(sqrtx2m1(_l_interval(x))); } // sqrt(x^2-1);
39 inline l_real sqrt1mx2(const l_real& x) throw()
40  { return mid(sqrt1mx2(_l_interval(x)));}
41 inline l_real ln_sqrtx2y2(const l_real& x, const l_real& y) throw()
42  { return mid(ln_sqrtx2y2(_l_interval(x),_l_interval(y)));}
43 inline l_real acoshp1(const l_real& x)
44  { return mid(acoshp1(l_interval(x)));}
45 
46 inline l_real sin(const l_real & x) throw()
47  { return mid(sin(_l_interval(x))); }
48 inline l_real cos(const l_real & x) throw()
49  { return mid(cos(_l_interval(x))); }
50 inline l_real tan(const l_real & x) throw()
51  { return mid(tan(_l_interval(x))); }
52 inline l_real cot(const l_real & x) throw()
53  { return mid(cot(_l_interval(x))); }
54 
55 inline l_real asin(const l_real & x)
56  { return mid(asin(_l_interval(x))); }
57 inline l_real acos(const l_real & x)
58  { return mid(acos(_l_interval(x))); }
59 inline l_real atan(const l_real & x)
60  { return mid(atan(_l_interval(x))); }
61 inline l_real acot(const l_real & x)
62  { return mid(acot(_l_interval(x))); }
63 
64 inline l_real exp(const l_real & x) throw()
65  { return mid(exp(_l_interval(x))); }
66 inline l_real exp2(const l_real & x) throw()
67 { return mid(exp2(_l_interval(x))); }
68 inline l_real exp10(const l_real & x) throw()
69 { return mid(exp10(_l_interval(x))); }
70 inline l_real expm1(const l_real &x) throw()
71  { return mid(expm1(l_interval(x))); }
72 inline l_real expmx2(const l_real& x) throw()
73  { return mid(expmx2(l_interval(x)));}
74 
75 inline l_real ln(const l_real & x)
76  { return mid(ln(_l_interval(x))); }
77 inline l_real log2(const l_real & x)
78 { return mid(log2(_l_interval(x))); }
79 inline l_real log10(const l_real & x)
80 { return mid(log10(_l_interval(x))); }
81 
82 inline l_real sinh(const l_real & x) throw()
83  { return mid(sinh(_l_interval(x))); }
84 inline l_real cosh(const l_real & x) throw()
85  { return mid(cosh(_l_interval(x))); }
86 inline l_real tanh(const l_real & x) throw()
87  { return mid(tanh(_l_interval(x))); }
88 inline l_real coth(const l_real & x) throw()
89  { return mid(coth(_l_interval(x))); }
90 
91 inline l_real asinh(const l_real & x)
92  { return mid(asinh(_l_interval(x))); }
93 inline l_real acosh(const l_real & x)
94  { return mid(acosh(_l_interval(x))); }
95 inline l_real atanh(const l_real & x)
96  { return mid(atanh(_l_interval(x))); }
97 inline l_real acoth(const l_real & x)
98  { return mid(acoth(_l_interval(x))); }
99 
100 inline l_real pow(const l_real & x,const l_real & expo)
101  { return mid(pow(_l_interval(x),_l_interval(expo))); }
102 
103 } // namespace cxsc
104 
cxsc::ln
cinterval ln(const cinterval &z)
Calculates .
Definition: cimath.cpp:851
cxsc::atan
cinterval atan(const cinterval &z)
Calculates .
Definition: cimath.cpp:2938
cxsc::exp10
cinterval exp10(const cinterval &z)
Calculates .
Definition: cimath.cpp:172
cxsc::exp2
cinterval exp2(const cinterval &z)
Calculates .
Definition: cimath.cpp:167
cxsc::tanh
cinterval tanh(const cinterval &z)
Calculates .
Definition: cimath.cpp:565
cxsc::expmx2
interval expmx2(const interval &x)
Calculates .
Definition: imath.cpp:192
cxsc::asin
cinterval asin(const cinterval &z)
Calculates .
Definition: cimath.cpp:2311
cxsc::mid
cvector mid(const cimatrix_subv &mv)
Returns the middle of the matrix.
Definition: cimatrix.inl:739
cxsc::sqrtx2m1
cinterval sqrtx2m1(const cinterval &z)
Calculates .
Definition: cimath.cpp:1109
cxsc::cosh
cinterval cosh(const cinterval &z)
Calculates .
Definition: cimath.cpp:223
cxsc::_l_interval
l_interval _l_interval(const real &a)
Definition: l_interval.hpp:879
cxsc::tan
cinterval tan(const cinterval &z)
Calculates .
Definition: cimath.cpp:393
cxsc::acoth
cinterval acoth(const cinterval &z)
Calculates .
Definition: cimath.cpp:3330
cxsc::sinh
cinterval sinh(const cinterval &z)
Calculates .
Definition: cimath.cpp:231
cxsc::coth
cinterval coth(const cinterval &z)
Calculates .
Definition: cimath.cpp:578
cxsc::sqrtp1m1
cinterval sqrtp1m1(const cinterval &z)
Calculates .
Definition: cimath.cpp:1054
cxsc::log2
cinterval log2(const cinterval &z)
Calculates .
Definition: cimath.cpp:898
cxsc::sqrt
cinterval sqrt(const cinterval &z)
Calculates .
Definition: cimath.cpp:1007
cxsc::acoshp1
interval acoshp1(const interval &x)
Calculates .
Definition: imath.cpp:617
cxsc::sqrt1mx2
cinterval sqrt1mx2(const cinterval &z)
Calculates .
Definition: cimath.cpp:1140
cxsc::pow
cinterval pow(const cinterval &z, const interval &p)
Calculates .
Definition: cimath.cpp:2074
cxsc::l_interval
The Multiple-Precision Data Type l_interval.
Definition: l_interval.hpp:71
cxsc::acosh
cinterval acosh(const cinterval &z)
Calculates .
Definition: cimath.cpp:2732
cxsc::cos
cinterval cos(const cinterval &z)
Calculates .
Definition: cimath.cpp:207
cxsc::acot
cinterval acot(const cinterval &z)
Calculates .
Definition: cimath.cpp:3130
cxsc::ln_sqrtx2y2
interval ln_sqrtx2y2(const interval &x, const interval &y)
Calculates .
Definition: imath.cpp:581
cxsc
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
cxsc::l_real
The Multiple-Precision Data Type l_real.
Definition: l_real.hpp:77
cxsc::sqr
cinterval sqr(const cinterval &z)
Calculates .
Definition: cimath.cpp:3342
cxsc::sin
cinterval sin(const cinterval &z)
Calculates .
Definition: cimath.cpp:215
cxsc::cot
cinterval cot(const cinterval &z)
Calculates .
Definition: cimath.cpp:538
cxsc::expm1
cinterval expm1(const cinterval &z)
Calculates .
Definition: cimath.cpp:177
cxsc::acos
cinterval acos(const cinterval &z)
Calculates .
Definition: cimath.cpp:2553
cxsc::exp
cinterval exp(const cinterval &z)
Calculates .
Definition: cimath.cpp:159
cxsc::atanh
cinterval atanh(const cinterval &z)
Calculates .
Definition: cimath.cpp:3317
cxsc::log10
cinterval log10(const cinterval &z)
Calculates .
Definition: cimath.cpp:903
cxsc::asinh
cinterval asinh(const cinterval &z)
Calculates .
Definition: cimath.cpp:2718