C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
rmath.hpp
00001 /*
00002 **  CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4)
00003 **
00004 **  Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik,
00005 **                          Universitaet Karlsruhe, Germany
00006 **            (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie
00007 **                          Universitaet Wuppertal, Germany   
00008 **
00009 **  This library is free software; you can redistribute it and/or
00010 **  modify it under the terms of the GNU Library General Public
00011 **  License as published by the Free Software Foundation; either
00012 **  version 2 of the License, or (at your option) any later version.
00013 **
00014 **  This library is distributed in the hope that it will be useful,
00015 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 **  Library General Public License for more details.
00018 **
00019 **  You should have received a copy of the GNU Library General Public
00020 **  License along with this library; if not, write to the Free
00021 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 */
00023 
00024 /* CVS $Id: rmath.hpp,v 1.36 2014/01/30 17:23:48 cxsc Exp $ */
00025 
00026 #ifndef _CXSC_RMATH_HPP_INCLUDED
00027 #define _CXSC_RMATH_HPP_INCLUDED
00028 
00029 #include "real.hpp"
00030 #include <dot.hpp> // Blomquist
00031 
00032 namespace cxsc {
00033 
00035 inline real sqr    (const real&) throw(); // Sqr(x)
00037 inline real sqrt   (const real&);         // Sqrt(x)
00039 inline real sqrt   (const real &, int);   // Sqrt(x, n)
00041        real sqrt1px2(const real&) throw();  // Sqrt(1+x^2); Blomquist 13.12.02
00043 inline real sqrtm1  (const real&); // Sqrt(x+1)-1; ohne Fehlerabsch�zung!
00045        real sqrtp1m1(const real&) throw(); // Blomquist 05.08.03
00047        real sqrtx2m1(const real&);
00049        real sqrt1mx2(const real&) throw(STD_FKT_OUT_OF_DEF);
00050               
00051 
00053 inline real sin    (const real&) throw();        // Sin(x)
00055        real sinpix_pi(const real& x);            // sin(pi*x)/pi;
00057 inline real cos    (const real&) throw();        // Cos(x)
00059 inline real tan    (const real&) throw();        // Tan(x)
00061 inline real cot    (const real&) throw();        // Cot(x)
00062 
00064 inline real asin   (const real&);                // ASin(x)
00066 inline real acos   (const real&);                // ACos(x)
00068 inline real atan   (const real&);                // ATan(x) 
00070 inline real acot   (const real&);                // ACot(x)
00071 
00073 inline real exp    (const real&) throw();        // Exp(x)
00075 inline real expm1  (const real&) throw();        // Exp(x)-1
00077        real expmx2 (const real&) throw();        // Exp(-x^2)
00079        real expx2  (const real& x);              // e^{+x^2}
00081        real expx2m1(const real& x);              // e^{+x^2}-1
00082 
00084 inline real lnp1   (const real&);                // Ln(1+x)
00086 inline real ln     (const real&);                // Ln(x)
00088 inline real log2     (const real&);              // Log2(x)
00090 inline real log10     (const real&);             // Log10(x)
00091 
00093 inline real sinh   (const real&) throw();        // Sinh(x)
00095 inline real cosh   (const real&) throw();        // Cosh(x)
00097        real acoshp1(const real& x) throw();      // acosh(1+x)
00099 inline real tanh   (const real&) throw();        // Tanh(x) 
00101 inline real coth   (const real&) throw();        // Coth(x)
00102 
00104 inline real asinh  (const real&);                // ASinh(x)
00106 inline real acosh  (const real&);                // ACosh(x)
00108 inline real atanh  (const real&);                // ATanh(x)
00110 inline real acoth  (const real&);                // ACoth(x)
00112 inline real erf    (const real&);                // error function
00114 inline real erfc   (const real&);                // complementary error function
00116        real gamma (const real& x);       // Gamma(x)
00118        real gammar(const real& x);       // 1/Gamma(x)
00119   
00121 inline real pow    (const real&, const real&);  // Pow(x,y)
00123 inline real power  (const real&, const int);    // Power(x,n)
00124 
00126        real sqrtx2y2(const real&, const real&) throw(); // Sqrt(x^2+y^2)
00128        real ln_sqrtx2y2(const real&, const real&) throw(STD_FKT_OUT_OF_DEF);  
00129                                                  // ln( sqrt(x^2+y^2) )
00130 
00132 real Cut24(const real&);
00134 real Cut25(const real&);
00136 real Cut26(const real&);
00138 int Round(const real& x) throw(); 
00140 int ceil(const real& x) throw();
00142 int ifloor(const real& x) throw();
00143 
00144 extern "C" {
00145    void r_lfsr(void); // Siehe real.hpp in real_ari...?!?!
00146 }
00147 
00148 } // namespace cxsc 
00149 
00150 #include "rmath.inl"
00151 #endif // _CXSC_RMATH_HPP_INCLUDED
00152