C-XSC - A C++ Class Library for Extended Scientific Computing 2.5.4
rts_real.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: rts_real.hpp,v 1.24 2014/01/30 17:23:48 cxsc Exp $ */
25
26
27#ifndef _CXSC_RTS_REAL_HPP_INCLUDED
28#define _CXSC_RTS_REAL_HPP_INCLUDED
29
30/* Deklarationen der Funktionen des Laufzeitsystems, die fuer die
31 gerichtete Rundung der Klasse "real" benoetigt werden, und
32 Definition dazu benoetigter Konvertierungsoperatoren.
33 (Declaration of functions of the runtime system, used for the
34 directed rounding in the class "real", and definitions of needed
35 conversion operators.)
36*/
37
38// Deklaration von Hilfsfunktionen des Laufzeitsystems
39// Der Typ a_real ist in p88rts.h des Laufzeitsystems als 64-Bit-Zahl definiert
40// (Help functions of the runtime system declarated here)
41
42#include "RtsTyp.h"
43
44namespace cxsc {
45
46// Verknuepfungen mit Rundung nach oben bzw. unten
47// (Operators with rounding upwards or downwards)
48extern "C" {
49#if ( OPT80387 )
50 a_real r_addd80387 (a_real a, a_real b); // speziell fuer 80387-Koprozessor
51 a_real r_addu80387 (a_real a, a_real b); // (especially for 80387)
52 a_real r_subd80387 (a_real a, a_real b);
53 a_real r_subu80387 (a_real a, a_real b);
54 a_real r_muld80387 (a_real a, a_real b);
55 a_real r_mulu80387 (a_real a, a_real b);
56 a_real r_divd80387 (a_real a, a_real b);
57 a_real r_divu80387 (a_real a, a_real b);
58#else
59 a_real r_addd (a_real a, a_real b);
60 a_real r_addu (a_real a, a_real b);
61 a_real r_subd (a_real a, a_real b);
62 a_real r_subu (a_real a, a_real b);
63 a_real r_muld (a_real a, a_real b);
64 a_real r_mulu (a_real a, a_real b);
65 a_real r_divd (a_real a, a_real b);
66 a_real r_divu (a_real a, a_real b);
67#endif
68
69#if HP_9000_CPP+SUN4_CPP_C
70 void r_lfsr();
71#endif
72}
73
74// namespace real
75//{
76
77// Operatoren fuer Umwandlungen zwischen real und a_real
78// (operators for conversions between real and a_real)
79
80class real;
81
82inline a_real _a_real(const real &x)
83{ return *((const a_real *)(&x));
84}
85
86// As a_real are doubles this is defined in real.hpp
87// inline real _real(const a_real &x)
88// { return *((const real *)(&x));
89// }
90
91//} // namespace real
92
93} // namespace cxsc
94
95#endif // _CXSC_RTS_REAL_HPP_INCLUDED
96
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition cdot.cpp:29