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

Double. More...

#include <base/Double.h>

Inherits Object.

Public Member Functions

 Double () noexcept
 
 Double (double _value) noexcept
 
 Double (const Double &copy) noexcept
 
Doubleoperator= (const Double &assign) noexcept
 
Doubleoperator= (double value) noexcept
 
double getValue () const noexcept
 
void setValue (double value) noexcept
 
bool isNegative () const noexcept
 
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 double () const noexcept
 

Static Public Member Functions

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

Protected Attributes

double value = 0
 

Detailed Description

Double.

This class is a wrapper for the double primitive.

Version
1.0

Constructor & Destructor Documentation

◆ Double() [1/3]

Double::Double ( )
inlinenoexcept

Initializes the value as zero.

◆ Double() [2/3]

Double::Double ( double  _value)
inlinenoexcept

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

Parameters
valueThe desired value.

◆ Double() [3/3]

Double::Double ( const Double copy)
inlinenoexcept

Initializes the value by other value.

Member Function Documentation

◆ getEpsilon()

static double Double::getEpsilon ( )
staticnoexcept

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

◆ getInfinity()

static double Double::getInfinity ( )
inlinestaticnoexcept

Returns infinity.

◆ getMaximum()

static double Double::getMaximum ( )
staticnoexcept

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

◆ getMinimum()

static double Double::getMinimum ( )
staticnoexcept

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

◆ getNaN()

static double Double::getNaN ( )
inlinestaticnoexcept

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

◆ getSign()

double Double::getSign ( ) const
inlinenoexcept

Returns the sign.

◆ getValue()

double Double::getValue ( ) const
inlinenoexcept

Returns the value of the double.

◆ isInfinity()

bool Double::isInfinity ( ) const
inlinenoexcept

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

◆ isNaN()

bool Double::isNaN ( ) const
inlinenoexcept

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

◆ isNegative()

bool Double::isNegative ( ) const
inlinenoexcept

Returns true if the value is negative.

◆ isOrdinary()

bool Double::isOrdinary ( ) const
inlinenoexcept

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

◆ isQuiteNaN()

bool Double::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 Double::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 double()

Double::operator double ( ) const
inlinenoexcept

Casts value to the double primitive.

◆ operator=() [1/2]

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

Assignment of value by value.

◆ operator=() [2/2]

Double& Double::operator= ( double  value)
inlinenoexcept

Assignment of this value by double primitive.

◆ setValue()

void Double::setValue ( double  value)
inlinenoexcept

Sets the value of the double.

Parameters
valueThe desired value.

Member Data Documentation

◆ value

double Double::value = 0
protected

The value.