26 #ifndef _CXSC_DOT_HPP_INCLUDED 27 #define _CXSC_DOT_HPP_INCLUDED 44 typedef d_otpr Dotprecision;
50 #include "ioflags.hpp" 57 template<
typename S,
typename T>
58 static inline void addDot( dotprecision&,
const S&,
const T&);
59 template<
typename S,
typename T>
60 static inline void addDot( cdotprecision&,
const S&,
const T&);
61 template<
typename S,
typename T>
62 static inline void addDot( cidotprecision&,
const S&,
const T&);
63 template<
typename S,
typename T>
64 static inline void addDot_op( dotprecision&,
const S&,
const T&);
65 template<
typename S,
typename T>
66 static inline void addDot_op( cdotprecision&,
const S&,
const T&);
68 static inline void addSum( dotprecision&,
const S&);
82 #ifdef CXSC_USE_TLS_PREC 85 extern __declspec(thread)
unsigned int opdotprec;
87 extern __thread
unsigned int opdotprec;
92 extern unsigned int opdotprec;
129 inline int get_k()
const {
return k; }
131 inline void set_k(
unsigned int i) { k=i; }
278 template<
typename S,
typename T>
279 friend INLINE
void addDot(
dotprecision&,
const S&,
const T&);
280 template<
typename S,
typename T>
281 friend INLINE
void addDot(
cdotprecision&,
const S&,
const T&);
282 template<
typename S,
typename T>
285 template<
typename S,
typename T>
286 friend INLINE
void addDot_op(
dotprecision&,
const S&,
const T&);
287 template<
typename S,
typename T>
288 friend INLINE
void addDot_op(
cdotprecision&,
const S&,
const T&);
295 inline Dotprecision* ptr() {
return &akku; }
305 std::string & operator <<(std::string &,
const dotprecision &)
throw();
306 std::string & operator >>(std::string &,dotprecision &)
throw();
307 void operator >>(
const std::string &,dotprecision &)
throw();
308 void operator >>(
const char *,dotprecision &)
throw();
309 std::ostream & operator <<(std::ostream &,
const dotprecision &)
throw();
310 std::istream & operator >>(std::istream &,dotprecision &)
throw();
311 dotprecision operator -(
const dotprecision &)
throw();
312 dotprecision operator +(
const dotprecision &)
throw();
313 dotprecision operator +(
const dotprecision &,
const dotprecision &)
throw();
314 dotprecision operator -(
const dotprecision &,
const dotprecision &)
throw();
315 inline idotprecision operator |(
const dotprecision &,
const dotprecision &)
throw();
316 dotprecision operator +(
const dotprecision &,
const real &)
throw();
317 dotprecision operator +(
const real &,
const dotprecision &)
throw();
318 dotprecision operator -(
const dotprecision &,
const real &)
throw();
319 dotprecision operator -(
const real &,
const dotprecision &)
throw();
320 inline idotprecision operator |(
const real &,
const dotprecision &)
throw();
321 inline idotprecision operator |(
const dotprecision &,
const real &)
throw();
322 dotprecision &
operator +=(dotprecision &,
const dotprecision &)
throw();
323 dotprecision & operator -=(dotprecision &,
const dotprecision &)
throw();
324 dotprecision &
operator +=(dotprecision &,
const real &)
throw();
325 dotprecision & operator -=(dotprecision &,
const real &)
throw();
326 bool operator !(
const dotprecision &)
throw();
327 bool operator ==(
const dotprecision &,
const dotprecision &)
throw();
328 bool operator !=(
const dotprecision &,
const dotprecision &)
throw();
329 bool operator <(
const dotprecision &,
const dotprecision &)
throw();
330 bool operator >(
const dotprecision &,
const dotprecision &)
throw();
331 bool operator <=(
const dotprecision &,
const dotprecision &)
throw();
332 bool operator >=(
const dotprecision &,
const dotprecision &)
throw();
333 bool operator ==(
const real &,
const dotprecision &)
throw();
334 bool operator !=(
const real &,
const dotprecision &)
throw();
335 bool operator <(
const real &,
const dotprecision &)
throw();
336 bool operator >(
const real &,
const dotprecision &)
throw();
337 bool operator <=(
const real &,
const dotprecision &)
throw();
338 bool operator >=(
const real &,
const dotprecision &)
throw();
339 bool operator ==(
const dotprecision &,
const real &)
throw();
340 bool operator !=(
const dotprecision &,
const real &)
throw();
341 bool operator <(
const dotprecision &,
const real &)
throw();
342 bool operator >(
const dotprecision &,
const real &)
throw();
343 bool operator <=(
const dotprecision &,
const real &)
throw();
344 bool operator >=(
const dotprecision &,
const real &)
throw();
345 void rnd (
const dotprecision&, real&, rndtype = RND_NEXT)
throw();
346 void rnd (
const dotprecision&, real&, real&)
throw();
347 void rnd (
const dotprecision&, interval&)
throw();
348 real rnd (
const dotprecision&, rndtype = RND_NEXT)
throw();
349 dotprecision
abs(
const dotprecision &)
throw();
350 int sign(
const dotprecision &)
throw();
351 dotprecision & accumulate (dotprecision&,
const real&,
const real&)
throw();
357 #endif // _CXSC_DOT_HPP_INCLUDED friend void rnd(const dotprecision &, real &, rndtype)
Converting the exact dotprecision value with one rounding into a real value.
dotprecision _dotprecision(const real &d)
void set_k(unsigned int i)
Set precision for computation of dot products.
friend std::string & operator<<(std::string &, const dotprecision &)
Implementation of standard output method.
friend bool operator >=(const dotprecision &, const dotprecision &)
Implementation of standard greater-or-equal-than operation.
friend bool operator >(const dotprecision &, const dotprecision &)
Implementation of standard greater-than operation.
The Data Type idotprecision.
The Multiple-Precision Data Type l_real.
The Data Type dotprecision.
friend idotprecision operator|(const dotprecision &, const dotprecision &)
Returns the convex hull of the arguments.
friend dotprecision operator -(const dotprecision &)
Implementation of standard algebraic negative sign operation.
The namespace cxsc, providing all functionality of the class library C-XSC.
int get_k() const
Get currently set precision for computation of dot products.
The Scalar Type interval.
friend std::string & operator >>(std::string &, dotprecision &)
Implementation of standard input method.
void set_err(real e)
Set the current error value, use with caution.
real get_err() const
Get the current error value (if dot products not computed in maximum precision)
int get_dotprec() const
Get currently set precision for computation of dot products.
friend dotprecision _dotprecision(const real &d)
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
friend bool operator==(const dotprecision &, const dotprecision &)
Implementation of standard equality operation.
friend dotprecision & operator+=(dotprecision &, const dotprecision &)
Implementation of standard algebraic addition and allocation operation.
The Data Type cidotprecision.
dotprecision & operator=(const dotprecision &)
Implementation of standard assigning operator.
friend dotprecision operator+(const dotprecision &)
Implementation of standard algebraic positive sign operation.
friend dotprecision & accumulate(dotprecision &, const real &, const real &)
The accurate scalar product of the last two arguments added to the value of the first argument.
The Data Type cdotprecision.
friend int sign(const dotprecision &)
The sign of a dotprecision value.
friend dotprecision & operator -=(dotprecision &, const dotprecision &)
Implementation of standard algebraic subtraction and allocation operation.
dotprecision(void)
Constructor of class dotprecision.
friend dotprecision abs(const dotprecision &)
The absolute value of a dotprecision value.
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc)
Implementation of standard algebraic addition and allocation operation.
friend dotprecision & accumulate_approx(dotprecision &, const real &, const real &)
The accurate scalar product of the last two arguments added to the value of the first argument (no er...
void set_dotprec(unsigned int i)
Set precision for computation of dot products.
friend bool operator !(const dotprecision &)
Implementation of standard negation operation.
friend bool operator<(const dotprecision &, const dotprecision &)
Implementation of standard less-than operation.
friend bool operator<=(const dotprecision &, const dotprecision &)
Implementation of standard less-or-equal-than operation.
friend bool operator !=(const dotprecision &, const dotprecision &)
Implementation of standard negated equality operation.
ivector abs(const cimatrix_subv &mv)
Returns the absolute value of the matrix.