TRealX Class Reference

class TRealX

A class encapsulating an extended precision real value.

This class provides 64 bit precision and a dynamic range of approximately 1E-9863 to 1E+9863. All member functions are optimized for speed.

Public Member Functions
TRealX()
TRealX(TInt)
TRealX(TUint)
TRealX(TUint, TUint, TUint)
TRealX(const TInt64 &)
TRealX(TReal32)
TRealX(TReal64)
IMPORT_C TIntAdd(TRealX &, const TRealX &)
IMPORT_C TIntAddEq(const TRealX &)
IMPORT_C TRealXOrderCompare(const TRealX &)
IMPORT_C TIntDiv(TRealX &, const TRealX &)
IMPORT_C TIntDivEq(const TRealX &)
IMPORT_C TIntGetTReal(TReal32 &)
IMPORT_C TIntGetTReal(TReal64 &)
IMPORT_C TBoolIsFinite()
IMPORT_C TBoolIsInfinite()
IMPORT_C TBoolIsNaN()
IMPORT_C TBoolIsZero()
IMPORT_C TIntMod(TRealX &, const TRealX &)
IMPORT_C TIntModEq(const TRealX &)
IMPORT_C TIntMult(TRealX &, const TRealX &)
IMPORT_C TIntMultEq(const TRealX &)
IMPORT_C TIntSet(TInt)
IMPORT_C TIntSet(TUint)
IMPORT_C TIntSet(const TInt64 &)
IMPORT_C TIntSet(TReal32)
IMPORT_C TIntSet(TReal64)
IMPORT_C voidSetInfinite(TBool)
IMPORT_C voidSetNaN()
IMPORT_C voidSetZero(TBool)
IMPORT_C TIntSub(TRealX &, const TRealX &)
IMPORT_C TIntSubEq(const TRealX &)
IMPORT_Coperator TInt()
IMPORT_Coperator TInt64()
IMPORT_Coperator TReal32()
IMPORT_Coperator TReal64()
IMPORT_Coperator TUint()
TBool operator!=(const TRealX &)
IMPORT_C TRealXoperator%(const TRealX &)
IMPORT_C const TRealX &operator%=(const TRealX &)
IMPORT_C TRealXoperator*(const TRealX &)
IMPORT_C const TRealX &operator*=(const TRealX &)
IMPORT_C TRealXoperator+()
IMPORT_C TRealXoperator+(const TRealX &)
IMPORT_C TRealX &operator++()
IMPORT_C TRealXoperator++(TInt)
IMPORT_C const TRealX &operator+=(const TRealX &)
IMPORT_C TRealXoperator-()
IMPORT_C TRealXoperator-(const TRealX &)
IMPORT_C TRealX &operator--()
IMPORT_C TRealXoperator--(TInt)
IMPORT_C const TRealX &operator-=(const TRealX &)
IMPORT_C TRealXoperator/(const TRealX &)
IMPORT_C const TRealX &operator/=(const TRealX &)
TBool operator<(const TRealX &)
TBool operator<=(const TRealX &)
IMPORT_C TRealX &operator=(TInt)
IMPORT_C TRealX &operator=(TUint)
IMPORT_C TRealX &operator=(const TInt64 &)
IMPORT_C TRealX &operator=(TReal32)
IMPORT_C TRealX &operator=(TReal64)
TBool operator==(const TRealX &)
TBool operator>(const TRealX &)
TBool operator>=(const TRealX &)
Public Member Enumerations
enumTRealXOrder { ELessThan = 1, EEqual = 2, EGreaterThan = 4, EUnordered = 8 }
Public Attributes
TUint16 iExp
TUint8 iFlag
TUint32 iMantHi
TUint32 iMantLo
TInt8 iSign

Constructor & Destructor Documentation

TRealX()

IMPORT_CTRealX()

TRealX(TInt)

IMPORT_CTRealX(TIntaInt)

Parameters

TInt aInt

TRealX(TUint)

IMPORT_CTRealX(TUintaInt)

Parameters

TUint aInt

TRealX(TUint, TUint, TUint)

IMPORT_CTRealX(TUintaExp,
TUintaMantHi,
TUintaMantLo
)

Parameters

TUint aExp
TUint aMantHi
TUint aMantLo

TRealX(const TInt64 &)

IMPORT_CTRealX(const TInt64 &aInt)

Parameters

const TInt64 & aInt

TRealX(TReal32)

IMPORT_CTRealX(TReal32aReal)

Parameters

TReal32 aReal

TRealX(TReal64)

IMPORT_CTRealX(TReal64aReal)

Parameters

TReal64 aReal

Member Functions Documentation

Add(TRealX &, const TRealX &)

IMPORT_C TIntAdd(TRealX &aResult,
const TRealX &aVal
)const

Parameters

TRealX & aResult
const TRealX & aVal

AddEq(const TRealX &)

IMPORT_C TIntAddEq(const TRealX &aVal)

Parameters

const TRealX & aVal

Compare(const TRealX &)

IMPORT_C TRealXOrderCompare(const TRealX &aVal)const

Parameters

const TRealX & aVal

Div(TRealX &, const TRealX &)

IMPORT_C TIntDiv(TRealX &aResult,
const TRealX &aVal
)const

Parameters

TRealX & aResult
const TRealX & aVal

DivEq(const TRealX &)

IMPORT_C TIntDivEq(const TRealX &aVal)

Parameters

const TRealX & aVal

GetTReal(TReal32 &)

IMPORT_C TIntGetTReal(TReal32 &aVal)const

Parameters

TReal32 & aVal

GetTReal(TReal64 &)

IMPORT_C TIntGetTReal(TReal64 &aVal)const

Parameters

TReal64 & aVal

IsFinite()

IMPORT_C TBoolIsFinite()const

IsInfinite()

IMPORT_C TBoolIsInfinite()const

IsNaN()

IMPORT_C TBoolIsNaN()const

IsZero()

IMPORT_C TBoolIsZero()const

Mod(TRealX &, const TRealX &)

IMPORT_C TIntMod(TRealX &aResult,
const TRealX &aVal
)const

Parameters

TRealX & aResult
const TRealX & aVal

ModEq(const TRealX &)

IMPORT_C TIntModEq(const TRealX &aVal)

Parameters

const TRealX & aVal

Mult(TRealX &, const TRealX &)

IMPORT_C TIntMult(TRealX &aResult,
const TRealX &aVal
)const

Parameters

TRealX & aResult
const TRealX & aVal

MultEq(const TRealX &)

IMPORT_C TIntMultEq(const TRealX &aVal)

Parameters

const TRealX & aVal

Set(TInt)

IMPORT_C TIntSet(TIntaInt)

Parameters

TInt aInt

Set(TUint)

IMPORT_C TIntSet(TUintaInt)

Parameters

TUint aInt

Set(const TInt64 &)

IMPORT_C TIntSet(const TInt64 &aInt)

Parameters

const TInt64 & aInt

Set(TReal32)

IMPORT_C TIntSet(TReal32aReal)

Parameters

TReal32 aReal

Set(TReal64)

IMPORT_C TIntSet(TReal64aReal)

Parameters

TReal64 aReal

SetInfinite(TBool)

IMPORT_C voidSetInfinite(TBoolaNegative)

Parameters

TBool aNegative

SetNaN()

IMPORT_C voidSetNaN()

SetZero(TBool)

IMPORT_C voidSetZero(TBoolaNegative = EFalse)

Parameters

TBool aNegative = EFalse

Sub(TRealX &, const TRealX &)

IMPORT_C TIntSub(TRealX &aResult,
const TRealX &aVal
)const

Parameters

TRealX & aResult
const TRealX & aVal

SubEq(const TRealX &)

IMPORT_C TIntSubEq(const TRealX &aVal)

Parameters

const TRealX & aVal

operator TInt()

IMPORT_Coperator TInt()const

operator TInt64()

IMPORT_Coperator TInt64()const

operator TReal32()

IMPORT_Coperator TReal32()const

operator TReal64()

IMPORT_Coperator TReal64()const

operator TUint()

IMPORT_Coperator TUint()const

operator!=(const TRealX &)

TBool operator!=(const TRealX &aVal)const [inline]

Compares this extended precision number for in-equality with another.

True, if this extended precision number is not equal to aVal; false, otherwise.

Parameters

const TRealX & aValA reference to the extended precision value to be compared.

operator%(const TRealX &)

IMPORT_C TRealXoperator%(const TRealX &aVal)const

Parameters

const TRealX & aVal

operator%=(const TRealX &)

IMPORT_C const TRealX &operator%=(const TRealX &aVal)

Parameters

const TRealX & aVal

operator*(const TRealX &)

IMPORT_C TRealXoperator*(const TRealX &aVal)const

Parameters

const TRealX & aVal

operator*=(const TRealX &)

IMPORT_C const TRealX &operator*=(const TRealX &aVal)

Parameters

const TRealX & aVal

operator+()

IMPORT_C TRealXoperator+()const

operator+(const TRealX &)

IMPORT_C TRealXoperator+(const TRealX &aVal)const

Parameters

const TRealX & aVal

operator++()

IMPORT_C TRealX &operator++()

operator++(TInt)

IMPORT_C TRealXoperator++(TInt)

Parameters

TInt

operator+=(const TRealX &)

IMPORT_C const TRealX &operator+=(const TRealX &aVal)

Parameters

const TRealX & aVal

operator-()

IMPORT_C TRealXoperator-()const

operator-(const TRealX &)

IMPORT_C TRealXoperator-(const TRealX &aVal)const

Parameters

const TRealX & aVal

operator--()

IMPORT_C TRealX &operator--()

operator--(TInt)

IMPORT_C TRealXoperator--(TInt)

Parameters

TInt

operator-=(const TRealX &)

IMPORT_C const TRealX &operator-=(const TRealX &aVal)

Parameters

const TRealX & aVal

operator/(const TRealX &)

IMPORT_C TRealXoperator/(const TRealX &aVal)const

Parameters

const TRealX & aVal

operator/=(const TRealX &)

IMPORT_C const TRealX &operator/=(const TRealX &aVal)

Parameters

const TRealX & aVal

operator<(const TRealX &)

TBool operator<(const TRealX &aVal)const [inline]

Compares this extended precision number for being less than another.

True, if this extended precision number is less than aVal, false, otherwise.

Parameters

const TRealX & aValA reference to the extended precision value to be compared.

operator<=(const TRealX &)

TBool operator<=(const TRealX &aVal)const [inline]

Compares this extended precision number for being less than or equal to another.

True, if this extended precision number is less than or equal to aVal, false, otherwise.

Parameters

const TRealX & aValA reference to the extended precision value to be compared.

operator=(TInt)

IMPORT_C TRealX &operator=(TIntaInt)

Parameters

TInt aInt

operator=(TUint)

IMPORT_C TRealX &operator=(TUintaInt)

Parameters

TUint aInt

operator=(const TInt64 &)

IMPORT_C TRealX &operator=(const TInt64 &aInt)

Parameters

const TInt64 & aInt

operator=(TReal32)

IMPORT_C TRealX &operator=(TReal32aReal)

Parameters

TReal32 aReal

operator=(TReal64)

IMPORT_C TRealX &operator=(TReal64aReal)

Parameters

TReal64 aReal

operator==(const TRealX &)

TBool operator==(const TRealX &aVal)const [inline]

Compares this extended precision number for equality with another.

True, if this extended precision number is equal to aVal; false, otherwise.

Parameters

const TRealX & aValA reference to the extended precision value to be compared.

operator>(const TRealX &)

TBool operator>(const TRealX &aVal)const [inline]

Compares this extended precision number for being greater than another.

True, if this extended precision number is greater than aVal, false, otherwise.

Parameters

const TRealX & aValA reference to the extended precision value to be compared.

operator>=(const TRealX &)

TBool operator>=(const TRealX &aVal)const [inline]

Compares this extended precision number for being greater than or equal to another.

True, if this extended precision number is greater than or equal to aVal, false, otherwise.

Parameters

const TRealX & aValA reference to the extended precision value to be compared.

Member Enumerations Documentation

Enum TRealXOrder

Enumerators

ELessThan = 1
EEqual = 2
EGreaterThan = 4
EUnordered = 8

Member Data Documentation

TUint16 iExp

TUint16 iExp

Exponent: biased by 32767, iExp=0 => zero, +65535 => infinity or NaN

TUint8 iFlag

TUint8 iFlag

Flags: 0 for exact, 1 for rounded down, 2 for rounded up

TUint32 iMantHi

TUint32 iMantHi

TUint32 iMantLo

TUint32 iMantLo

The mantissa.

TInt8 iSign

TInt8 iSign

The sign: 0 for +, 1 for -