C-XSC - A C++ Class Library for Extended Scientific Computing 2.5.4
rmath.hpp
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: rmath.hpp,v 1.36 2014/01/30 17:23:48 cxsc Exp $ */
25
26#ifndef _CXSC_RMATH_HPP_INCLUDED
27#define _CXSC_RMATH_HPP_INCLUDED
28
29#include "real.hpp"
30#include <dot.hpp> // Blomquist
31
32namespace cxsc {
33
35inline real sqr (const real&) noexcept; // Sqr(x)
37inline real sqrt (const real&); // Sqrt(x)
39inline real sqrt (const real &, int); // Sqrt(x, n)
41 real sqrt1px2(const real&) noexcept; // Sqrt(1+x^2); Blomquist 13.12.02
43inline real sqrtm1 (const real&); // Sqrt(x+1)-1; ohne Fehlerabsch�zung!
45 real sqrtp1m1(const real&) noexcept; // Blomquist 05.08.03
47 real sqrtx2m1(const real&);
49 real sqrt1mx2(const real&);
50
51
53inline real sin (const real&) noexcept; // Sin(x)
55 real sinpix_pi(const real& x); // sin(pi*x)/pi;
57inline real cos (const real&) noexcept; // Cos(x)
59inline real tan (const real&) noexcept; // Tan(x)
61inline real cot (const real&) noexcept; // Cot(x)
62
64inline real asin (const real&); // ASin(x)
66inline real acos (const real&); // ACos(x)
68inline real atan (const real&); // ATan(x)
70inline real acot (const real&); // ACot(x)
71
73inline real exp (const real&) noexcept; // Exp(x)
75inline real expm1 (const real&) noexcept; // Exp(x)-1
77 real expmx2 (const real&) noexcept; // Exp(-x^2)
79 real expx2 (const real& x); // e^{+x^2}
81 real expx2m1(const real& x); // e^{+x^2}-1
82
84inline real lnp1 (const real&); // Ln(1+x)
86inline real ln (const real&); // Ln(x)
88inline real log2 (const real&); // Log2(x)
90inline real log10 (const real&); // Log10(x)
91
93inline real sinh (const real&) noexcept; // Sinh(x)
95inline real cosh (const real&) noexcept; // Cosh(x)
97 real acoshp1(const real& x) noexcept; // acosh(1+x)
99inline real tanh (const real&) noexcept; // Tanh(x)
101inline real coth (const real&) noexcept; // Coth(x)
102
104inline real asinh (const real&); // ASinh(x)
106inline real acosh (const real&); // ACosh(x)
108inline real atanh (const real&); // ATanh(x)
110inline real acoth (const real&); // ACoth(x)
112inline real erf (const real&); // error function
114inline real erfc (const real&); // complementary error function
116 real gamma (const real& x); // Gamma(x)
118 real gammar(const real& x); // 1/Gamma(x)
119
121inline real pow (const real&, const real&); // Pow(x,y)
123inline real power (const real&, const int); // Power(x,n)
124
126 real sqrtx2y2(const real&, const real&) noexcept; // Sqrt(x^2+y^2)
128 real ln_sqrtx2y2(const real&, const real&);
129 // ln( sqrt(x^2+y^2) )
130
132real Cut24(const real&);
134real Cut25(const real&);
136real Cut26(const real&);
138int Round(const real& x) noexcept;
140int ceil(const real& x) noexcept;
142int ifloor(const real& x) noexcept;
143
144extern "C" {
145 void r_lfsr(void); // Siehe real.hpp in real_ari...?!?!
146}
147
148} // namespace cxsc
149
150#include "rmath.inl"
151#endif // _CXSC_RMATH_HPP_INCLUDED
152
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition cdot.cpp:29
cinterval sqrtp1m1(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:1054
cinterval sqrt1mx2(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:1140
interval erf(const interval &a)
The Gauss error function .
Definition imath.cpp:354
cinterval asinh(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:2718
interval gamma(const interval &x)
The Gamma function.
Definition imath.cpp:1465
cinterval coth(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:578
int ifloor(const real &x) noexcept
Rounding to the greates integer smaller or equal x; -2147483649 < x <= 2147483647....
Definition rmath.cpp:570
cinterval log2(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:898
int Round(const real &x) noexcept
Rouding to the next integer; |x| < 2147483647.5.
Definition rmath.cpp:536
cinterval power(const cinterval &z, int n) noexcept
Calculates .
Definition cimath.cpp:1941
interval sinpix_pi(const interval &x)
Calculates ;.
Definition imath.cpp:655
cinterval log10(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:903
interval expx2(const interval &x)
Calculates .
Definition imath.cpp:234
real Cut25(const real &x)
Returns a real value, which corresponds with the first 25 mantissa bits of x.
Definition rmath.cpp:504
cinterval ln(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:851
int ceil(const real &x) noexcept
Rounding to the smallest integer greater or equal x; -2147483649 < x <= 2147483647....
Definition rmath.cpp:558
cinterval pow(const cinterval &z, const interval &p) noexcept
Calculates .
Definition cimath.cpp:2074
interval expmx2(const interval &x)
Calculates .
Definition imath.cpp:192
real Cut24(const real &x)
Returns a real value, which corresponds with the first 24 mantissa bits of x.
Definition rmath.cpp:488
cinterval sinh(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:231
cinterval asin(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:2311
interval acoshp1(const interval &x)
Calculates .
Definition imath.cpp:617
cinterval tan(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:393
cinterval acos(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:2553
cinterval sqrtx2m1(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:1109
cinterval acosh(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:2732
real sqrtm1(const real &)
Calculates .
Definition rmath.inl:69
cinterval cosh(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:223
cinterval cos(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:207
cinterval sqrt1px2(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:1071
cinterval exp(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:159
interval gammar(const interval &x)
The inverse Gamma function: 1/Gamma(x)
Definition imath.cpp:1361
interval erfc(const interval &a)
The complementary Gauss error function .
Definition imath.cpp:361
interval expx2m1(const interval &x)
Calculates .
Definition imath.cpp:300
cinterval tanh(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:565
interval ln_sqrtx2y2(const interval &x, const interval &y) noexcept
Calculates .
Definition imath.cpp:581
cinterval expm1(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:177
cinterval cot(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:538
cinterval sqrt(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:1007
real Cut26(const real &x)
Returns a real value, which corresponds with the first 26 mantissa bits of x.
Definition rmath.cpp:520
cinterval acot(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:3130
cinterval sqr(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:3342
cinterval lnp1(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:867
cinterval atan(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:2938
cinterval atanh(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:3317
cinterval acoth(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:3330
interval sqrtx2y2(const interval &x, const interval &y) noexcept
Calculates .
Definition imath.cpp:80
cinterval sin(const cinterval &z) noexcept
Calculates .
Definition cimath.cpp:215