HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_Decimal128 Class Reference

Decimal128 floating point class (IEEE 754-2008) More...

#include <SYS_Decimal128.h>

Public Member Functions

 SYS_Decimal128 ()=default
 Default constructor, leaves value uninitialized. More...
 
 SYS_Decimal128 (int32 v)
 
 SYS_Decimal128 (uint32 v)
 
 SYS_Decimal128 (fpreal32 v)
 
 SYS_Decimal128 (fpreal64 v)
 
 SYS_Decimal128 (const char *str)
 
int32 roundedInt () const
 Round to nearest integer, 0.6 rounds up. More...
 
SYS_Decimal128 operator- () const
 Unary minus. More...
 
void zero ()
 Set to zero. More...
 
uint numDigits () const
 Determine number of significant digits. More...
 
void toString (char *str) const
 Conversion to string, buffer must contain at least NUMBUF bytes. More...
 
void fromString (const char *str)
 Conversion from string. More...
 
 operator int32 () const
 
 operator uint32 () const
 
 operator fpreal32 () const
 
 operator fpreal64 () const
 
SYS_Decimal128operator= (int32 v)
 
SYS_Decimal128operator= (uint32 v)
 
SYS_Decimal128operator= (fpreal32 v)
 
SYS_Decimal128operator= (fpreal64 v)
 
SYS_Decimal128operator+= (const SYS_Decimal128 &v)
 
SYS_Decimal128operator-= (const SYS_Decimal128 &v)
 
SYS_Decimal128operator*= (const SYS_Decimal128 &v)
 
SYS_Decimal128operator/= (const SYS_Decimal128 &v)
 
bool isCanonical () const
 
bool isFinite () const
 
bool isInfinite () const
 
bool isInteger () const
 
bool isNan () const
 
bool isNegative () const
 
bool isNormal () const
 
bool isPositive () const
 
bool isZero () const
 
bool operator== (const SYS_Decimal128 &v) const
 
bool operator!= (const SYS_Decimal128 &v) const
 
bool operator< (const SYS_Decimal128 &v) const
 
bool operator<= (const SYS_Decimal128 &v) const
 
bool operator> (const SYS_Decimal128 &v) const
 
bool operator>= (const SYS_Decimal128 &v) const
 

Static Public Attributes

static const int NUMBUF = 43
 Maximum string length+1. More...
 

Detailed Description

Decimal128 floating point class (IEEE 754-2008)

Definition at line 24 of file SYS_Decimal128.h.

Constructor & Destructor Documentation

SYS_Decimal128::SYS_Decimal128 ( )
default

Default constructor, leaves value uninitialized.

SYS_Decimal128::SYS_Decimal128 ( int32  v)
inlineexplicit

Definition at line 138 of file SYS_Decimal128.h.

SYS_Decimal128::SYS_Decimal128 ( uint32  v)
inlineexplicit

Definition at line 144 of file SYS_Decimal128.h.

SYS_Decimal128::SYS_Decimal128 ( fpreal32  v)
inlineexplicit

Definition at line 150 of file SYS_Decimal128.h.

SYS_Decimal128::SYS_Decimal128 ( fpreal64  v)
inlineexplicit

Definition at line 156 of file SYS_Decimal128.h.

SYS_Decimal128::SYS_Decimal128 ( const char *  str)
inlineexplicit

Definition at line 162 of file SYS_Decimal128.h.

Member Function Documentation

void SYS_Decimal128::fromString ( const char *  str)

Conversion from string.

bool SYS_Decimal128::isCanonical ( ) const

Classification

bool SYS_Decimal128::isFinite ( ) const

Classification

bool SYS_Decimal128::isInfinite ( ) const

Classification

bool SYS_Decimal128::isInteger ( ) const

Classification

bool SYS_Decimal128::isNan ( ) const

Classification

bool SYS_Decimal128::isNegative ( ) const

Classification

bool SYS_Decimal128::isNormal ( ) const

Classification

bool SYS_Decimal128::isPositive ( ) const

Classification

bool SYS_Decimal128::isZero ( ) const

Classification

uint SYS_Decimal128::numDigits ( ) const

Determine number of significant digits.

SYS_Decimal128::operator fpreal32 ( ) const

Conversion to other type

SYS_Decimal128::operator fpreal64 ( ) const

Conversion to other type

SYS_Decimal128::operator int32 ( ) const

Conversion to other type

SYS_Decimal128::operator uint32 ( ) const

Conversion to other type

bool SYS_Decimal128::operator!= ( const SYS_Decimal128 v) const
inline

Comparison Operators

Definition at line 88 of file SYS_Decimal128.h.

SYS_Decimal128& SYS_Decimal128::operator*= ( const SYS_Decimal128 v)

Arithmetic Assignment

SYS_Decimal128& SYS_Decimal128::operator+= ( const SYS_Decimal128 v)

Arithmetic Assignment

SYS_Decimal128 SYS_Decimal128::operator- ( ) const

Unary minus.

SYS_Decimal128& SYS_Decimal128::operator-= ( const SYS_Decimal128 v)

Arithmetic Assignment

SYS_Decimal128& SYS_Decimal128::operator/= ( const SYS_Decimal128 v)

Arithmetic Assignment

bool SYS_Decimal128::operator< ( const SYS_Decimal128 v) const

Comparison Operators

bool SYS_Decimal128::operator<= ( const SYS_Decimal128 v) const

Comparison Operators

SYS_Decimal128& SYS_Decimal128::operator= ( int32  v)

Assignment

SYS_Decimal128& SYS_Decimal128::operator= ( uint32  v)

Assignment

SYS_Decimal128& SYS_Decimal128::operator= ( fpreal32  v)

Assignment

SYS_Decimal128& SYS_Decimal128::operator= ( fpreal64  v)

Assignment

bool SYS_Decimal128::operator== ( const SYS_Decimal128 v) const

Comparison Operators

bool SYS_Decimal128::operator> ( const SYS_Decimal128 v) const

Comparison Operators

bool SYS_Decimal128::operator>= ( const SYS_Decimal128 v) const

Comparison Operators

int32 SYS_Decimal128::roundedInt ( ) const

Round to nearest integer, 0.6 rounds up.

void SYS_Decimal128::toString ( char *  str) const

Conversion to string, buffer must contain at least NUMBUF bytes.

void SYS_Decimal128::zero ( )

Set to zero.

Member Data Documentation

const int SYS_Decimal128::NUMBUF = 43
static

Maximum string length+1.

Definition at line 97 of file SYS_Decimal128.h.


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