/* ** Example "example.cpp": Using the headerfile "ha_imath.hpp" ** ** 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 #include "interval.hpp" // C-XSC Headerfile interval #include "imath.hpp" // C-XSC Headerfile elementary functions #include "ha_imath.hpp" // additional Headerfile for // elementary functions of high accuracy using namespace std; using namespace cxsc; int main() { interval x; cout << "Interval x: "; cin >> x; cout << Scientific << SetPrecision(23,15); cout << "Sine function of C-XSC:" << endl; cout << " cxsc::sin(x) = " << cxsc::sin(x) << endl; cout << "Sine function with high accuracy:" << endl; cout << "ha_cxsc::sin(x) = " << ha_cxsc::sin(x) << endl; return 0; }