/* ** ha_rmath.hpp: additional headerfile for the C-XSC library ** mathematical standard functions (elementary functions) ** of high accuracy for real arguments ** ** Copyright (C) 2002 Dr. W. Hofschuster ** Wiss. Rechnen/Softwaretechnologie ** Universitaet Wuppertal, Germany ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Library General Public ** License as published by the Free Software Foundation; either ** version 2 of the License, or (at your option) any later version. ** ** This library is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** Library General Public License for more details. ** ** You should have received a copy of the GNU Library General Public ** License along with this library; if not, write to the Free ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "rts_real.hpp" extern "C" { #ifndef rfcth_included #define rfcth_included #include "r_fcth.h" #endif } namespace ha_cxsc { inline cxsc::real sqr (const cxsc::real &a) { return r_sqr_(_a_real(a)); } inline cxsc::real sqrt (const cxsc::real &a) { return r_sqrt(_a_real(a)); } inline cxsc::real sin (const cxsc::real &a) { return r_sin(_a_real(a)); } inline cxsc::real cos (const cxsc::real &a) { return r_cos(_a_real(a)); } inline cxsc::real tan (const cxsc::real &a) { return r_tan(_a_real(a)); } inline cxsc::real cot (const cxsc::real &a) { return r_cot(_a_real(a)); } inline cxsc::real asin (const cxsc::real &a) { return r_asin(_a_real(a)); } inline cxsc::real acos (const cxsc::real &a) { return r_acos(_a_real(a)); } inline cxsc::real atan (const cxsc::real &a) { return r_atan(_a_real(a)); } inline cxsc::real acot (const cxsc::real &a) { return r_acot(_a_real(a)); } inline cxsc::real exp (const cxsc::real &a) { return r_exp(_a_real(a)); } inline cxsc::real ln (const cxsc::real &a) { return r_log(_a_real(a)); } inline cxsc::real sinh (const cxsc::real &a) { return r_log(_a_real(a)); } inline cxsc::real cosh (const cxsc::real &a) { return r_cosh(_a_real(a)); } inline cxsc::real tanh (const cxsc::real &a) { return r_tanh(_a_real(a)); } inline cxsc::real coth (const cxsc::real &a) { return r_coth(_a_real(a)); } inline cxsc::real asinh (const cxsc::real &a) { return r_asnh(_a_real(a)); } inline cxsc::real acosh (const cxsc::real &a) { return r_acsh(_a_real(a)); } inline cxsc::real atanh (const cxsc::real &a) { return r_atnh(_a_real(a)); } inline cxsc::real acoth (const cxsc::real &a) { return r_acth(_a_real(a)); } inline cxsc::real pow (const cxsc::real &a, const cxsc::real &b) { return r_pow(_a_real(a),_a_real(b)); } inline cxsc::real power (const cxsc::real &a, const int n) { return r_pow(_a_real(a),_a_real(n)); } //--------------------------------------------------------------- // Additional elementary functions //--------------------------------------------------------------- // Inverse tangent function with two arguments. inline cxsc::real atan2 (const cxsc::real &a, const cxsc::real &b) { return r_atn2(_a_real(a),_a_real(b)); } // 10 power a inline cxsc::real exp10 (const cxsc::real &a) { return r_ep10(_a_real(a)); } // 2 power a inline cxsc::real exp2 (const cxsc::real &a) { return r_exp2(_a_real(a)); } // logarithm of a base 10.0 inline cxsc::real log10 (const cxsc::real &a) { return r_lg10(_a_real(a)); } // logarithm of a base 2.0 inline cxsc::real log2 (const cxsc::real &a) { return r_log2(_a_real(a)); } // logarithm of a base a inline cxsc::real loga (const cxsc::real &x, const cxsc::real &a) { return r_loga(_a_real(x),_a_real(a)); } }