C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
cxsc::dotprecision Class Reference

The Data Type dotprecision. More...

#include <dot.hpp>

List of all members.

Public Member Functions

 dotprecision (void) throw ()
 Constructor of class dotprecision.
 dotprecision (const dotprecision &) throw ()
 Constructor of class dotprecision.
 dotprecision (const real &) throw ()
 Constructor of class dotprecision.
 dotprecision (const l_real &) throw ()
 Constructor of class dotprecision.
int get_dotprec () const
 Get currently set precision for computation of dot products.
real get_err () const
 Get the current error value (if dot products not computed in maximum precision)
int get_k () const
 Get currently set precision for computation of dot products.
dotprecisionoperator= (const dotprecision &) throw ()
 Implementation of standard assigning operator.
dotprecisionoperator= (const real &) throw ()
 Implementation of standard assigning operator.
dotprecisionoperator= (const l_real &) throw ()
 Implementation of standard assigning operator.
void set_dotprec (unsigned int i)
 Set precision for computation of dot products.
void set_err (real e)
 Set the current error value, use with caution.
void set_k (unsigned int i)
 Set precision for computation of dot products.

Friends

dotprecision _dotprecision (const real &d) throw ()
 Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
dotprecision abs (const dotprecision &) throw ()
 The absolute value of a dotprecision value.
dotprecisionaccumulate (dotprecision &, const real &, const real &) throw ()
 The accurate scalar product of the last two arguments added to the value of the first argument.
dotprecisionaccumulate_approx (dotprecision &, const real &, const real &) throw ()
 The accurate scalar product of the last two arguments added to the value of the first argument (no error bounds)
bool operator! (const dotprecision &) throw ()
 Implementation of standard negation operation.
bool operator!= (const dotprecision &, const dotprecision &) throw ()
 Implementation of standard negated equality operation.
bool operator!= (const real &, const dotprecision &) throw ()
 Implementation of standard negated equality operation.
bool operator!= (const dotprecision &, const real &) throw ()
 Implementation of standard negated equality operation.
dotprecision operator+ (const dotprecision &) throw ()
 Implementation of standard algebraic positive sign operation.
dotprecision operator+ (const dotprecision &, const dotprecision &) throw ()
 Implementation of standard algebraic addition operation.
dotprecision operator+ (const dotprecision &, const real &) throw ()
 Implementation of standard algebraic addition operation.
dotprecision operator+ (const real &, const dotprecision &) throw ()
 Implementation of standard algebraic addition operation.
dotprecisionoperator+= (dotprecision &, const dotprecision &) throw ()
 Implementation of standard algebraic addition and allocation operation.
dotprecisionoperator+= (dotprecision &, const real &) throw ()
 Implementation of standard algebraic addition and allocation operation.
dotprecision operator- (const dotprecision &) throw ()
 Implementation of standard algebraic negative sign operation.
dotprecision operator- (const dotprecision &, const dotprecision &) throw ()
 Implementation of standard algebraic subtraction operation.
dotprecision operator- (const dotprecision &, const real &) throw ()
 Implementation of standard algebraic subtraction operation.
dotprecision operator- (const real &, const dotprecision &) throw ()
 Implementation of standard algebraic subtraction operation.
dotprecisionoperator-= (dotprecision &, const dotprecision &) throw ()
 Implementation of standard algebraic subtraction and allocation operation.
dotprecisionoperator-= (dotprecision &, const real &) throw ()
 Implementation of standard algebraic subtraction and allocation operation.
bool operator< (const dotprecision &, const dotprecision &) throw ()
 Implementation of standard less-than operation.
bool operator< (const real &, const dotprecision &) throw ()
 Implementation of standard less-than operation.
bool operator< (const dotprecision &, const real &) throw ()
 Implementation of standard less-than operation.
std::string & operator<< (std::string &, const dotprecision &) throw ()
 Implementation of standard output method.
std::ostream & operator<< (std::ostream &, const dotprecision &) throw ()
 Implementation of standard output method.
bool operator<= (const dotprecision &, const dotprecision &) throw ()
 Implementation of standard less-or-equal-than operation.
bool operator<= (const real &, const dotprecision &) throw ()
 Implementation of standard less-or-equal-than operation.
bool operator<= (const dotprecision &, const real &) throw ()
 Implementation of standard less-or-equal-than operation.
bool operator== (const dotprecision &, const dotprecision &) throw ()
 Implementation of standard equality operation.
bool operator== (const real &, const dotprecision &) throw ()
 Implementation of standard equality operation.
bool operator== (const dotprecision &, const real &) throw ()
 Implementation of standard equality operation.
bool operator> (const dotprecision &, const dotprecision &) throw ()
 Implementation of standard greater-than operation.
bool operator> (const real &, const dotprecision &) throw ()
 Implementation of standard greater-than operation.
bool operator> (const dotprecision &, const real &) throw ()
 Implementation of standard greater-than operation.
bool operator>= (const dotprecision &, const dotprecision &) throw ()
 Implementation of standard greater-or-equal-than operation.
bool operator>= (const real &, const dotprecision &) throw ()
 Implementation of standard greater-or-equal-than operation.
bool operator>= (const dotprecision &, const real &) throw ()
 Implementation of standard greater-or-equal-than operation.
std::string & operator>> (std::string &, dotprecision &) throw ()
 Implementation of standard input method.
void operator>> (const std::string &, dotprecision &) throw ()
 Implementation of standard input method.
void operator>> (const char *, dotprecision &) throw ()
 Implementation of standard input method.
std::istream & operator>> (std::istream &, dotprecision &) throw ()
 Implementation of standard input method.
idotprecision operator| (const dotprecision &, const dotprecision &) throw ()
 Returns the convex hull of the arguments.
idotprecision operator| (const real &, const dotprecision &) throw ()
 Returns the convex hull of the arguments.
idotprecision operator| (const dotprecision &, const real &) throw ()
 Returns the convex hull of the arguments.
void rnd (const dotprecision &, real &, rndtype) throw ()
 Converting the exact dotprecision value with one rounding into a real value.
void rnd (const dotprecision &, real &, real &) throw ()
 Converting the exact dotprecision value with one rounding into the nearest lower and upper real value.
void rnd (const dotprecision &, interval &) throw ()
 Converting the exact dotprecision value into an interval with the nearest lower and upper bound.
real rnd (const dotprecision &, rndtype) throw ()
 Converting the exact dotprecision value with one rounding into a real value.
int sign (const dotprecision &) throw ()
 The sign of a dotprecision value.

Detailed Description

The Data Type dotprecision.

The data types dotprecision, idotprecision, cdotprecision and cidotprecision are based on the scalar data types real, interval, complex, and cinterval, respectively. Variables of these data types permit the exact representation of products of two arbitrary numbers of the corresponding scalar base type and the exact summation of an arbitrary number of such products in a dotprecision accumulator, i.e. in a fixed-point format of suitable size.

In general, values and variables of dotprecision data types occur during the calculation of scalar product expressions. Their values are exactly representable in the format of the dotprecision data types, i.e. without rounding error, independent of the size of the vectors or matrices contained in the scalar product expressions.

Since C-XSC Version 2.3.0, the precision for dot products computed with the dotprecision types can be choosen by the user. The default is precision k=0, which means maximum precision (the behaviour of older C-XSC Versions). For k=1, pure floating point operations are used and an error bound is computed using manipulation of the rounding mode of the processor. For k>=2, the so called DotK algorithm is used, simulating higher precision computations and also computing an error bound. When calling the rnd() function, the error bound will be added to the result interval. The resulting intervals will be wider for lower k, but computations will be significantly faster than with maximum precision (k=0).

Definition at line 111 of file dot.hpp.


Friends And Related Function Documentation

dotprecision _dotprecision ( const real d) throw () [friend]

Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.

Deprecated:
use standard contructors for typecasting
See also:
dotprecision(const real &)

Definition at line 304 of file dot.hpp.


The documentation for this class was generated from the following files: