Base Framework
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
LongDouble Class Reference

Long double. More...

#include <base/LongDouble.h>

Inherits Object.

Public Member Functions

 LongDouble () noexcept
 
 LongDouble (long double _value) noexcept
 
 LongDouble (const LongDouble &copy) noexcept
 
LongDoubleoperator= (const LongDouble &assign) noexcept
 
LongDoubleoperator= (long double value) noexcept
 
long double getValue () const noexcept
 
void setValue (long double value) noexcept
 
bool isNegative () const noexcept
 
long double getSign () const noexcept
 
bool isOrdinary () const noexcept
 
bool isInfinity () const noexcept
 
bool isNaN () const noexcept
 
bool isQuiteNaN () const noexcept
 
bool isSignalingNaN () const noexcept
 
 operator long double () const noexcept
 

Static Public Member Functions

static long double getMinimum () noexcept
 
static long double getMaximum () noexcept
 
static long double getEpsilon () noexcept
 
static long double getInfinity () noexcept
 
static long double getNaN () noexcept
 

Protected Attributes

long double value = 0
 

Detailed Description

Long double.

This class is a wrapper for the long double primitive.

Version
1.0

Constructor & Destructor Documentation

◆ LongDouble() [1/3]

LongDouble::LongDouble ( )
inlinenoexcept

Initializes the value as zero.

◆ LongDouble() [2/3]

LongDouble::LongDouble ( long double  _value)
inlinenoexcept

Initializes the long double with the specified value. Implicit initialization is allowed.

Parameters
valueThe desired value.

◆ LongDouble() [3/3]

LongDouble::LongDouble ( const LongDouble copy)
inlinenoexcept

Initializes the value by other value.

Member Function Documentation

◆ getEpsilon()

static long double LongDouble::getEpsilon ( )
staticnoexcept

The difference between 1 and the least value greater than 1 that is representable in the given floating point type.

◆ getInfinity()

static long double LongDouble::getInfinity ( )
inlinestaticnoexcept

Returns infinity.

◆ getMaximum()

static long double LongDouble::getMaximum ( )
staticnoexcept

Maximum representable finite floating-point number (2^e_max).

◆ getMinimum()

static long double LongDouble::getMinimum ( )
staticnoexcept

Minimum normalized positive floating-point number (2^(e_min-1)).

◆ getNaN()

static long double LongDouble::getNaN ( )
inlinestaticnoexcept

Returns quiet NaN. Signaling NaN should be avoided due to platform inconsistencies.

◆ getSign()

long double LongDouble::getSign ( ) const
inlinenoexcept

Returns the sign.

◆ getValue()

long double LongDouble::getValue ( ) const
inlinenoexcept

Returns the value of the long double.

◆ isInfinity()

bool LongDouble::isInfinity ( ) const
inlinenoexcept

Returns true if the value is either +INFINITY or -INFINITY.

◆ isNaN()

bool LongDouble::isNaN ( ) const
inlinenoexcept

Returns true if the value is Not a Number (NaN).

◆ isNegative()

bool LongDouble::isNegative ( ) const
inlinenoexcept

Returns true if the value is negative.

◆ isOrdinary()

bool LongDouble::isOrdinary ( ) const
inlinenoexcept

Returns true if the value is an ordinary number (not infinity or NaN).

◆ isQuiteNaN()

bool LongDouble::isQuiteNaN ( ) const
inlinenoexcept

Returns true if the value is a quite NaN. A NaN that behaves predictably and does not raise exceptions in arithmetic operations is called a quiet NaN.

◆ isSignalingNaN()

bool LongDouble::isSignalingNaN ( ) const
inlinenoexcept

Returns true if the value is a signaling NaN. A NaN that generally raises an exception when encountered as an operand of arithmetic operations is called a signaling NaN.

◆ operator long double()

LongDouble::operator long double ( ) const
inlinenoexcept

Casts value to the long double primitive.

◆ operator=() [1/2]

LongDouble& LongDouble::operator= ( const LongDouble assign)
inlinenoexcept

Assignment of value by value.

◆ operator=() [2/2]

LongDouble& LongDouble::operator= ( long double  value)
inlinenoexcept

Assignment of this value by long double primitive.

◆ setValue()

void LongDouble::setValue ( long double  value)
inlinenoexcept

Sets the value of the long double.

Parameters
valueThe desired value.

Member Data Documentation

◆ value

long double LongDouble::value = 0
protected

The value.