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

The Multiple-Precision Data Type l_real. More...

#include <l_real.hpp>

Collaboration diagram for cxsc::l_real:
Collaboration graph

Public Member Functions

 l_real (const dotprecision &) noexcept
 Constructor of class l_real.
 
 l_real (const double &) noexcept
 Constructor of class l_real.
 
 l_real (const l_real &) noexcept
 Constructor of class l_real.
 
 l_real (const l_rmatrix &) noexcept
 Constructor of class l_real.
 
 l_real (const l_rmatrix_slice &) noexcept
 Constructor of class l_real.
 
 l_real (const l_rvector &) noexcept
 Constructor of class l_real.
 
 l_real (const l_rvector_slice &) noexcept
 Constructor of class l_real.
 
 l_real (const real &) noexcept
 Constructor of class l_real.
 
 l_real (int) noexcept
 Constructor of class l_real.
 
 l_real (long) noexcept
 Constructor of class l_real.
 
 l_real (void) noexcept
 Constructor of class l_real.
 
l_realoperator= (const dotprecision &) noexcept
 Implementation of standard assigning operator.
 
l_realoperator= (const l_real &) noexcept
 Implementation of standard assigning operator.
 
l_realoperator= (const lx_real &) noexcept
 Implementation of standard assigning operator.
 
l_realoperator= (const real &) noexcept
 Implementation of standard assigning operator.
 
realoperator[] (int) const noexcept
 Access to the single components used to store the long data type value.
 

Friends

real _l_real (const l_rmatrix &) noexcept
 Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
 
real _l_real (const l_rmatrix_slice &) noexcept
 Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
 
real _l_real (const l_rvector &) noexcept
 Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
 
real _l_real (const l_rvector_slice &) noexcept
 Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
 
l_real abs (const l_real &lr1)
 The absolute value of a l_real value.
 
void accumulate (dotprecision &d, const l_real &lr, const real &r)
 The accurate scalar product of the last two arguments added to the value of the first argument.
 
void accumulate (dotprecision &d, const l_real &lr1, const l_real &lr2)
 The accurate scalar product of the last two arguments added to the value of the first argument.
 
void accumulate (dotprecision &d, const real &r, const l_real &lr)
 The accurate scalar product of the last two arguments added to the value of the first argument.
 
void accumulate (idotprecision &a, const l_real &b, const l_real &c)
 The accurate scalar product of the last two arguments added to the value of the first argument.
 
void accumulate (idotprecision &a, const l_real &b, const real &c)
 The accurate scalar product of the last two arguments added to the value of the first argument.
 
void accumulate (idotprecision &a, const real &b, const l_real &c)
 The accurate scalar product of the last two arguments added to the value of the first argument.
 
l_real adjust (const l_real &x)
 Sets the precision of a specific long datatype value.
 
int expo_gr (const l_real &x)
 Returns the maximum of the expo-function.
 
int expo_sm (const l_real &x)
 Returns the minimum of the expo-function.
 
l_real Inf (const l_interval &li)
 Returns the infimum of an l_interval.
 
l_real mid (const l_interval &li)
 Returns the rounded middle of the l_interval.
 
bool operator! (const l_real &lr)
 Implementation of standard negation operation.
 
bool operator!= (const dotprecision &d, const l_real &lr)
 Implementation of standard negated equality operation.
 
bool operator!= (const idotprecision &i, const l_real &r)
 Implementation of standard negated equality operation.
 
bool operator!= (const interval &i, const l_real &r)
 Implementation of standard negated equality operation.
 
bool operator!= (const l_real &lr, const dotprecision &d)
 Implementation of standard negated equality operation.
 
bool operator!= (const l_real &lr, const real &r)
 Implementation of standard negated equality operation.
 
bool operator!= (const l_real &lr1, const l_real &lr2)
 Implementation of standard negated equality operation.
 
bool operator!= (const l_real &r, const idotprecision &i)
 Implementation of standard negated equality operation.
 
bool operator!= (const l_real &r, const interval &i)
 Implementation of standard negated equality operation.
 
bool operator!= (const real &r, const l_real &lr)
 Implementation of standard negated equality operation.
 
l_real operator* (const l_real &lr, const real &r)
 Implementation of standard algebraic multiplication operation.
 
l_real operator* (const l_real &lr1, const l_real &lr2)
 Implementation of standard algebraic multiplication operation.
 
l_real operator* (const real &r, const l_real &lr)
 Implementation of standard algebraic multiplication operation.
 
l_realoperator*= (l_real &lr, const real &r)
 Implementation of standard algebraic multiplication and allocation operation.
 
l_realoperator*= (l_real &lr1, const l_real &lr2)
 Implementation of standard algebraic multiplication and allocation operation.
 
realoperator*= (real &r, const l_real &lr)
 Implementation of standard algebraic multiplication and allocation operation.
 
dotprecision operator+ (const dotprecision &r, const l_real &lr)
 Implementation of standard algebraic addition operation.
 
dotprecision operator+ (const l_real &lr, const dotprecision &r)
 Implementation of standard algebraic addition operation.
 
l_real operator+ (const l_real &lr, const real &r)
 Implementation of standard algebraic addition operation.
 
l_real operator+ (const l_real &lr1)
 Implementation of standard algebraic positive sign operation.
 
l_real operator+ (const l_real &lr1, const l_real &lr2)
 Implementation of standard algebraic addition operation.
 
l_real operator+ (const real &r, const l_real &lr)
 Implementation of standard algebraic addition operation.
 
dotprecisionoperator+= (dotprecision &d, const l_real &lr) noexcept
 Implementation of standard algebraic addition and allocation operation.
 
l_realoperator+= (l_real &lr, const real &r)
 Implementation of standard algebraic addition and allocation operation.
 
l_realoperator+= (l_real &lr1, const l_real &lr2)
 Implementation of standard algebraic addition and allocation operation.
 
realoperator+= (real &r, const l_real &lr)
 Implementation of standard algebraic addition and allocation operation.
 
dotprecision operator- (const dotprecision &r, const l_real &lr)
 Implementation of standard algebraic subtraction operation.
 
dotprecision operator- (const l_real &lr, const dotprecision &r)
 Implementation of standard algebraic subtraction operation.
 
l_real operator- (const l_real &lr, const real &r)
 Implementation of standard algebraic subtraction operation.
 
l_real operator- (const l_real &lr1)
 Implementation of standard algebraic negative sign operation.
 
l_real operator- (const l_real &lr1, const l_real &lr2)
 Implementation of standard algebraic subtraction operation.
 
l_real operator- (const real &r, const l_real &lr)
 Implementation of standard algebraic subtraction operation.
 
dotprecisionoperator-= (dotprecision &d, const l_real &lr) noexcept
 Implementation of standard algebraic subtraction and allocation operation.
 
l_realoperator-= (l_real &lr, const real &r)
 Implementation of standard algebraic subtraction and allocation operation.
 
l_realoperator-= (l_real &lr1, const l_real &lr2)
 Implementation of standard algebraic subtraction and allocation operation.
 
realoperator-= (real &r, const l_real &lr)
 Implementation of standard algebraic subtraction and allocation operation.
 
l_real operator/ (const l_real &lr, const real &r)
 Implementation of standard algebraic division operation.
 
l_real operator/ (const l_real &lr1, const l_real &lr2)
 Implementation of standard algebraic division operation.
 
l_real operator/ (const real &r, const l_real &lr)
 Implementation of standard algebraic division operation.
 
l_realoperator/= (l_real &lr, const real &r)
 Implementation of standard algebraic division and allocation operation.
 
l_realoperator/= (l_real &lr1, const l_real &lr2)
 Implementation of standard algebraic division and allocation operation.
 
realoperator/= (real &r, const l_real &lr)
 Implementation of standard algebraic division and allocation operation.
 
bool operator< (const dotprecision &d, const l_real &lr)
 Implementation of standard less-than operation.
 
bool operator< (const idotprecision &i, const l_real &r)
 Implementation of standard less-than operation.
 
bool operator< (const interval &i, const l_real &r)
 Implementation of standard less-than operation.
 
bool operator< (const l_real &lr, const dotprecision &d)
 Implementation of standard less-than operation.
 
bool operator< (const l_real &lr, const real &r)
 Implementation of standard less-than operation.
 
bool operator< (const l_real &lr1, const l_real &lr2)
 Implementation of standard less-than operation.
 
bool operator< (const l_real &r, const idotprecision &i)
 Implementation of standard less-than operation.
 
bool operator< (const l_real &r, const interval &i)
 Implementation of standard less-than operation.
 
bool operator< (const real &r, const l_real &lr)
 Implementation of standard less-than operation.
 
std::ostream & operator<< (std::ostream &s, const l_real &lr)
 Implementation of standard output method.
 
std::string & operator<< (std::string &s, const l_real &lr)
 Implementation of standard output method.
 
bool operator<= (const dotprecision &d, const l_real &lr)
 Implementation of standard less-or-equal-than operation.
 
bool operator<= (const idotprecision &i, const l_real &r)
 Implementation of standard less-or-equal-than operation.
 
bool operator<= (const interval &i, const l_real &r)
 Implementation of standard less-or-equal-than operation.
 
bool operator<= (const l_real &lr, const dotprecision &d)
 Implementation of standard less-or-equal-than operation.
 
bool operator<= (const l_real &lr, const real &r)
 Implementation of standard less-or-equal-than operation.
 
bool operator<= (const l_real &lr1, const l_real &lr2)
 Implementation of standard less-or-equal-than operation.
 
bool operator<= (const l_real &r, const idotprecision &i)
 Implementation of standard less-or-equal-than operation.
 
bool operator<= (const l_real &r, const interval &i)
 Implementation of standard less-or-equal-than operation.
 
bool operator<= (const real &r, const l_real &lr)
 Implementation of standard less-or-equal-than operation.
 
bool operator== (const dotprecision &d, const l_real &lr)
 Implementation of standard equality operation.
 
bool operator== (const idotprecision &i, const l_real &r)
 Implementation of standard equality operation.
 
bool operator== (const interval &i, const l_real &r)
 Implementation of standard equality operation.
 
bool operator== (const l_real &lr, const dotprecision &d)
 Implementation of standard equality operation.
 
bool operator== (const l_real &lr, const real &r)
 Implementation of standard equality operation.
 
bool operator== (const l_real &lr1, const l_real &lr2)
 Implementation of standard equality operation.
 
bool operator== (const l_real &r, const idotprecision &i)
 Implementation of standard equality operation.
 
bool operator== (const l_real &r, const interval &i)
 Implementation of standard equality operation.
 
bool operator== (const real &r, const l_real &lr)
 Implementation of standard equality operation.
 
bool operator> (const dotprecision &d, const l_real &lr)
 Implementation of standard greater-than operation.
 
bool operator> (const idotprecision &i, const l_real &r)
 Implementation of standard greater-than operation.
 
bool operator> (const interval &i, const l_real &r)
 Implementation of standard greater-than operation.
 
bool operator> (const l_real &lr, const dotprecision &d)
 Implementation of standard greater-than operation.
 
bool operator> (const l_real &lr, const real &r)
 Implementation of standard greater-than operation.
 
bool operator> (const l_real &lr1, const l_real &lr2)
 Implementation of standard greater-than operation.
 
bool operator> (const l_real &r, const idotprecision &i)
 Implementation of standard greater-than operation.
 
bool operator> (const l_real &r, const interval &i)
 Implementation of standard greater-than operation.
 
bool operator> (const real &r, const l_real &lr)
 Implementation of standard greater-than operation.
 
bool operator>= (const dotprecision &d, const l_real &lr)
 Implementation of standard greater-or-equal-than operation.
 
bool operator>= (const idotprecision &i, const l_real &r)
 Implementation of standard greater-or-equal-than operation.
 
bool operator>= (const interval &i, const l_real &r)
 Implementation of standard greater-or-equal-than operation.
 
bool operator>= (const l_real &lr, const dotprecision &d)
 Implementation of standard greater-or-equal-than operation.
 
bool operator>= (const l_real &lr, const real &r)
 Implementation of standard greater-or-equal-than operation.
 
bool operator>= (const l_real &lr1, const l_real &lr2)
 Implementation of standard greater-or-equal-than operation.
 
bool operator>= (const l_real &r, const idotprecision &i)
 Implementation of standard greater-or-equal-than operation.
 
bool operator>= (const l_real &r, const interval &i)
 Implementation of standard greater-or-equal-than operation.
 
bool operator>= (const real &r, const l_real &lr)
 Implementation of standard greater-or-equal-than operation.
 
void operator>> (const char *s, l_real &lr)
 Implementation of standard input method.
 
void operator>> (const std::string &s, l_real &lr)
 Implementation of standard input method.
 
std::istream & operator>> (std::istream &s, l_real &lr)
 Implementation of standard input method.
 
std::string & operator>> (std::string &s, l_real &lr)
 Implementation of standard input method.
 
idotprecision operator| (const dotprecision &a, const l_real &b)
 Returns the convex hull of the arguments.
 
idotprecision operator| (const l_real &a, const dotprecision &b)
 Returns the convex hull of the arguments.
 
l_interval operator| (const l_real &a, const l_real &b)
 Returns the convex hull of the arguments.
 
l_interval operator| (const l_real &a, const real &b)
 Returns the convex hull of the arguments.
 
l_interval operator| (const real &a, const l_real &b)
 Returns the convex hull of the arguments.
 
l_real rnd_down (const dotprecision &a)
 Rounds the argument down to the next l_real value.
 
l_real rnd_up (const dotprecision &a)
 Rounds the argument up to the next l_real value.
 
int sign (const l_real &lr)
 The sign of a l_real value.
 
int StagPrec (const l_real &lr)
 Returns the precision of the long datatype value.
 
l_real Sup (const l_interval &li)
 Returns the supremum of an l_interval.
 
bool zero_ (const l_real &lr)
 Checks if the argument is zero.
 

Detailed Description

The Multiple-Precision Data Type l_real.

The multiple-precision data type l_real is a variant of the scalar type real, which provides support for longer numbers, thus increasing the accuracy of the data type.

The multiple-precision arithmetic is based on the staggered correction principle briefly described below.

Basic Ideas of the Staggered Correction Multiple-Precision Arithmetic

A real staggered correction mulitple-precision number $ X $ is a vector $ \vec X = (x_i)^{n}_{1} $ of C-XSC type real floating-point numbers. The value of a multiple-precision number $ X $ is the number in $ R $ that is the exact sum of the components of the vector,

\[
X = \sum \limits_{i=1}^n x_i , x_i \in R = R(b,l,e_{min},e{max})
\]

See also
real

Definition at line 77 of file l_real.hpp.

Friends And Related Symbol Documentation

◆ _l_real [1/4]

real _l_real ( const l_rmatrix & )
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
l_real(const l_rmatrix &)

◆ _l_real [2/4]

real _l_real ( const l_rmatrix_slice & )
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
l_real(const l_rmatrix_slice &)

◆ _l_real [3/4]

real _l_real ( const l_rvector & )
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
l_real(const l_rvector &)

◆ _l_real [4/4]

real _l_real ( const l_rvector_slice & )
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
l_real(const l_rvector_slice &)

◆ expo_gr

int expo_gr ( const l_real & x)
friend

Returns the maximum of the expo-function.

Parameters
xThe value for which to calculate
Returns
The result of the calculation

Result for a multiple-precisionnumber $ x = \sum \limits_{i=1}^n x_i $.

\[
\mbox{expo}_{ \mbox{gr} } (x) = \mbox{expo}( \mbox{ max } \{ | x_i | x_i \not= 0 \;,\; i = 1,...,n\})
\]

Definition at line 744 of file l_real.cpp.

◆ expo_sm

int expo_sm ( const l_real & x)
friend

Returns the minimum of the expo-function.

Parameters
xThe value for which to calculate
Returns
The result of the calculation

Result for a multiple-precisionnumber $ x = \sum \limits_{i=1}^n x_i $ .

\[
\mbox{expo}_{ \mbox{sm} }(x) = \mbox{expo}( \mbox{ min } \{ | x_i | x_i \not= 0 \;,\; i = 1,...,n\})
\]

Definition at line 725 of file l_real.cpp.


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