C-XSC - A C++ Class Library for Extended Scientific Computing
2.5.4
|
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: l_imath.hpp,v 1.33 2014/01/30 17:23:46 cxsc Exp $ */ 00025 00026 #ifndef _CXSC_L_IMATH_HPP_INCLUDED 00027 #define _CXSC_L_IMATH_HPP_INCLUDED 00028 00029 #include "l_interval.hpp" 00030 00031 namespace cxsc { 00032 00034 l_interval pow (const l_interval&, const l_interval&) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF); // Pow(x,y) 00036 l_interval power (const l_interval&, int); // Power(x,n) 00038 l_interval sqr (const l_interval&); // Sqr(x) 00039 00041 l_interval sqrt (const l_interval&) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF); 00042 // Sqrt(x) 00044 l_interval sqrt (const l_interval&, int) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF); 00045 // NSqrt(n,x) 00046 00048 l_interval sin (const l_interval&) throw(ERROR_LINTERVAL_FAK_OVERFLOW); 00049 // Sin(x) 00051 l_interval cos (const l_interval&) throw(ERROR_LINTERVAL_FAK_OVERFLOW); 00052 // Cos(x) 00054 l_interval tan (const l_interval&) throw(ERROR_LINTERVAL_FAK_OVERFLOW,ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF); 00055 // Tan(x) 00057 l_interval cot (const l_interval&) throw(ERROR_LINTERVAL_FAK_OVERFLOW,ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF); 00058 // Cot(x) 00059 00061 l_interval asin (const l_interval&) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF); 00062 // ASin(x) 00064 l_interval acos (const l_interval&) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF); 00065 // ACos(x) 00067 l_interval atan (const l_interval&) throw(); // ATan(x) 00069 l_interval acot (const l_interval&) throw(); // ACot(x) 00070 00072 l_interval exp (const l_interval&) throw(ERROR_LINTERVAL_FAK_OVERFLOW); 00073 // exp(x) 00075 l_interval exp2(const l_interval &); // 2^x 00076 00078 l_interval exp10(const l_interval &); // 10^x 00079 00081 l_interval expm1(const l_interval & x) throw(); // exp(x)-1; 00083 l_interval expmx2 (const l_interval&); // e^(-x^2); 00085 l_interval ln (const l_interval&) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF); 00086 // Ln(x) 00088 l_interval log2(const l_interval &); 00090 l_interval log10(const l_interval &); 00092 l_interval lnp1 (const l_interval&) throw(); // ln(1+x) 00094 l_interval sinh (const l_interval&) throw(ERROR_LINTERVAL_FAK_OVERFLOW); 00095 // Sinh(x) 00097 l_interval cosh (const l_interval&) throw(ERROR_LINTERVAL_FAK_OVERFLOW); 00098 // Cosh(x) 00100 l_interval tanh (const l_interval&) throw(); // Tanh(x) 00102 l_interval coth (const l_interval&) throw(); // Coth(x) 00103 00105 l_interval asinh (const l_interval&) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF,ERROR_LINTERVAL_FAK_OVERFLOW); 00106 // ASinh(x) 00108 l_interval acosh (const l_interval&) throw(); // ACosh(x) 00110 l_interval acoshp1 (const l_interval& x); 00112 l_interval atanh (const l_interval&) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF,ERROR_LINTERVAL_FAK_OVERFLOW); 00113 // ATanh(x) 00115 l_interval acoth (const l_interval&) throw(ERROR_LINTERVAL_STD_FKT_OUT_OF_DEF,ERROR_LINTERVAL_FAK_OVERFLOW); 00116 // ACoth(x) 00117 00119 l_interval sqrt1px2(const l_interval&) throw(); // Sqrt(1+x^2); 00121 l_interval sqrtx2y2(const l_interval&, const l_interval&) throw(); 00122 // Sqrt(x^2+y^2); 00124 l_interval sqrtp1m1(const l_interval&) throw(STD_FKT_OUT_OF_DEF); 00125 // sqrtp1m1(x) calculates an inclusion of sqrt(x+1)-1 00127 l_interval sqrtx2m1(const l_interval&); // sqrt(x^2-1) 00129 l_interval sqrt1mx2(const l_interval&); // sqrt(1-x^2) 00130 00132 l_interval ln_sqrtx2y2(const l_interval&, const l_interval&) throw(); 00133 00134 // some constants as functions for l_interval 00135 // l_interval li_ln2() throw(); // ln(2) 00136 // l_interval li_ln10() throw(); // ln(10) 00137 // l_interval li_Rln10() throw(); // 1/ln(10) 00138 // l_interval li_pi4() throw(); // Pi/4 00139 // l_interval li_sqrt2() throw(); // sqrt(2) 00141 l_interval Ln2_l_interval() throw(); // ln(2) 00143 l_interval Ln10_l_interval() throw(); // ln(10) 00145 l_interval Ln10r_l_interval() throw(); // 1/ln(10) 00147 l_interval Pid4_l_interval() throw(); // Pi/4 00149 l_interval Sqrt2_l_interval() throw(); // sqrt(2) 00151 l_interval Sqrt5_l_interval() throw(); // sqrt(5) 00153 l_interval Sqrt7_l_interval() throw(); // sqrt(7) 00154 00155 // obsolete functions, for compability 00157 inline l_interval li_ln2() {return Ln2_l_interval();} // ln(2) 00159 inline l_interval li_ln10() {return Ln10_l_interval();} // ln(10) 00161 inline l_interval li_Rln10(){return Ln10r_l_interval();} // 1/ln(10) 00163 inline l_interval li_pi4() {return Pid4_l_interval();} // Pi/4 00165 inline l_interval li_sqrt2(){return Sqrt2_l_interval();} // sqrt(2) 00166 00168 l_interval Ln2r_l_interval() throw(); // 1/ln(2) 00170 l_interval Pi_l_interval() throw(); // Pi 00172 l_interval Pid2_l_interval() throw(); // Pi/2 00174 l_interval Pi2_l_interval() throw(); // 2*Pi 00176 l_interval Pid3_l_interval() throw(); // Pi/3 00178 l_interval Pir_l_interval() throw(); // 1/Pi 00180 l_interval Pi2r_l_interval() throw(); // 1/(2*Pi) 00182 l_interval SqrtPi_l_interval() throw(); // sqrt(Pi) 00184 l_interval Sqrt2Pi_l_interval() throw(); // sqrt(2*Pi) 00186 l_interval SqrtPir_l_interval() throw(); // 1/sqrt(Pi) 00188 l_interval Sqrt2Pir_l_interval() throw(); // 1/sqrt(2*Pi) 00190 l_interval Pip2_l_interval() throw(); // Pi^2 00192 l_interval Sqrt2r_l_interval() throw(); // 1/sqrt(2) 00194 l_interval Sqrt3_l_interval() throw(); // sqrt(3) 00196 l_interval Sqrt3d2_l_interval() throw(); // sqrt(3)/2 00198 l_interval Sqrt3r_l_interval() throw(); // 1/sqrt(3) 00200 l_interval LnPi_l_interval() throw(); // ln(Pi) 00202 l_interval Ln2Pi_l_interval() throw(); // ln(2*Pi) 00204 l_interval E_l_interval() throw(); // e = exp(1) 00206 l_interval Er_l_interval() throw(); // 1/e 00208 l_interval Ep2_l_interval() throw(); // e^2 00210 l_interval Ep2r_l_interval() throw(); // 1/e^2 00212 l_interval EpPi_l_interval() throw(); // e^Pi 00214 l_interval Ep2Pi_l_interval() throw(); // e^(2*Pi) 00216 l_interval EpPid2_l_interval() throw(); // e^(Pi/2) 00218 l_interval EpPid4_l_interval() throw(); // e^(Pi/4) 00220 l_interval EulerGa_l_interval() throw(); // EulerGamma 00222 l_interval Catalan_l_interval() throw(); // Catalan 00223 } // namespace cxsc 00224 00225 #endif // _CXSC_L_IMATH_HPP_INCLUDED