|
C-XSC - A C++ Class Library for Extended Scientific Computing 2.5.4
|
The Scalar Type real. More...
#include <real.hpp>

Public Member Functions | |
| real (const double &a) noexcept | |
| Constructor of class real. | |
| real (const float &a) noexcept | |
| Constructor of class real. | |
| real (const int a) noexcept | |
| Constructor of class real. | |
| real (const l_real &) noexcept | |
| Constructor of class real. | |
| real (const long a) noexcept | |
| Constructor of class real. | |
| INLINE | real (const rmatrix &) noexcept |
| Constructor of class real. | |
| INLINE | real (const rmatrix_slice &) noexcept |
| Constructor of class real. | |
| INLINE | real (const rvector &) noexcept |
| Constructor of class real. | |
| INLINE | real (const rvector_slice &) noexcept |
| Constructor of class real. | |
| real (void) noexcept | |
| Constructor of class real. | |
Friends | |
| double | _double (const real &a) noexcept |
| Typecast to convert a real value into a double value. | |
| real | _real (const double &a) noexcept |
| Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC. | |
| INLINE real | _real (const rmatrix &) noexcept |
| Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC. | |
| INLINE real | _real (const rmatrix_slice &) noexcept |
| Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC. | |
| INLINE real | _real (const rvector &) noexcept |
| Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC. | |
| INLINE real | _real (const rvector_slice &) noexcept |
| Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC. | |
| real | abs (const real &a) noexcept |
| The absolute value of a real value. | |
| real | adddown (const real &, const real &) |
| Addition of two real values and rounding the result downwards. | |
| real | addup (const real &, const real &) |
| Addition of two real values and rounding the result upwards. | |
| real | comp (const real &, a_intg) |
| Composes an IEEE floating point value out of an given mantissa and exponent. | |
| real | divdown (const real &, const real &) |
| Division of two real values and rounding the result downwards. | |
| real | divup (const real &, const real &) |
| Division of two real values and rounding the result upwards. | |
| a_intg | expo (const real &) noexcept |
| The exponent of a real value. | |
| real | mant (const real &) noexcept |
| The mantissa of a real value. | |
| real | multdown (const real &, const real &) |
| Multiplication of two real values and rounding the result downwards. | |
| real | multup (const real &, const real &) |
| Multiplication of two real values and rounding the result upwards. | |
| bool | operator! (const real &a) noexcept |
| Implementation of standard negation operation. | |
| bool | operator!= (const double &a, const real &b) noexcept |
| Implementation of standard negated equality operation. | |
| bool | operator!= (const float &a, const real &b) noexcept |
| Implementation of standard negated equality operation. | |
| bool | operator!= (const int &a, const real &b) noexcept |
| Implementation of standard negated equality operation. | |
| bool | operator!= (const long &a, const real &b) noexcept |
| Implementation of standard negated equality operation. | |
| bool | operator!= (const real &a, const double &b) noexcept |
| Implementation of standard negated equality operation. | |
| bool | operator!= (const real &a, const float &b) noexcept |
| Implementation of standard negated equality operation. | |
| bool | operator!= (const real &a, const int &b) noexcept |
| Implementation of standard negated equality operation. | |
| bool | operator!= (const real &a, const long &b) noexcept |
| Implementation of standard negated equality operation. | |
| bool | operator!= (const real &a, const real &b) noexcept |
| Implementation of standard negated equality operation. | |
| real | operator* (const real &, const real &) noexcept |
| Implementation of standard algebraic multiplication operation. | |
| real & | operator*= (real &, const real &) noexcept |
| Implementation of standard algebraic multiplication and allocation operation. | |
| real | operator+ (const real &) noexcept |
| Implementation of standard algebraic positive sign operation. | |
| real | operator+ (const real &, const real &) noexcept |
| Implementation of standard algebraic addition operation. | |
| real & | operator+= (real &, const real &) noexcept |
| Implementation of standard algebraic addition and allocation operation. | |
| real | operator- (const real &) noexcept |
| Implementation of standard algebraic negative sign operation. | |
| real | operator- (const real &, const real &) noexcept |
| Implementation of standard algebraic subtraction operation. | |
| real & | operator-= (real &, const real &) noexcept |
| Implementation of standard algebraic subtraction and allocation operation. | |
| real | operator/ (const real &, const real &) noexcept |
| Implementation of standard algebraic division operation. | |
| real & | operator/= (real &, const real &) noexcept |
| Implementation of standard algebraic division and allocation operation. | |
| bool | operator< (const real &a, const real &b) noexcept |
| Implementation of standard less-than operation. | |
| std::ostream & | operator<< (std::ostream &o, const real &a) |
| Implementation of standard output method. | |
| std::string & | operator<< (std::string &s, const real &a) |
| Implementation of standard output method. | |
| bool | operator<= (const real &a, const real &b) noexcept |
| Implementation of standard less-or-equal-than operation. | |
| bool | operator== (const double &a, const real &b) noexcept |
| Implementation of standard equality operation. | |
| bool | operator== (const float &a, const real &b) noexcept |
| Implementation of standard equality operation. | |
| bool | operator== (const int &a, const real &b) noexcept |
| Implementation of standard equality operation. | |
| bool | operator== (const long &a, const real &b) noexcept |
| Implementation of standard equality operation. | |
| bool | operator== (const real &a, const double &b) noexcept |
| Implementation of standard equality operation. | |
| bool | operator== (const real &a, const float &b) noexcept |
| Implementation of standard equality operation. | |
| bool | operator== (const real &a, const int &b) noexcept |
| Implementation of standard equality operation. | |
| bool | operator== (const real &a, const long &b) noexcept |
| Implementation of standard equality operation. | |
| bool | operator== (const real &a, const real &b) noexcept |
| Implementation of standard equality operation. | |
| bool | operator> (const real &a, const real &b) noexcept |
| Implementation of standard greater-than operation. | |
| bool | operator>= (const real &a, const real &b) noexcept |
| Implementation of standard greater-or-equal-than operation. | |
| void | operator>> (const char *a, real &b) |
| Implementation of standard output method. | |
| void | operator>> (const std::string &, real &) |
| Implementation of standard input method. | |
| std::istream & | operator>> (std::istream &s, real &a) |
| Implementation of standard input method. | |
| std::string & | operator>> (std::string &str, real &a) |
| Implementation of standard input method. | |
| real | pred (const real &) noexcept |
| The predecessor of a real value. | |
| int | sign (const real &) noexcept |
| The sign of a real value. | |
| real | subdown (const real &, const real &) |
| Subtraction of two real values and rounding the result downwards. | |
| real | subup (const real &, const real &) |
| Subtraction of two real values and rounding the result upwards. | |
| real | succ (const real &) noexcept |
| The successor of a real value. | |
The Scalar Type real.
The arithmetic of C-XSC is based on the IEEE standard for binary floating-point arithmetic. Data of the type real consist of all floating-point numbers and special values specified by the standard for floating-point numbers of double mantissa length. Therefore, a number of the type real is a 64-bit value, and the base 

The C-XSC data type real differs only in some special aspects such as error handling from the C type double if used on a IEEE standard conforming arithmetic. If the C compiler on the host computer is not standard conforming, the data type real uses its own IEEE software arithmetic. Hence, the introduction of a new data type is necessary for the portability of C-XSC.
A sketch of the real floating-point data format is given in the figure below.
The most significant bit is the sign bit, denoted by 
The remaining 63 bits of the floating-point numbr are subdivided as follows:
The mantissa length 

The exponent 



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