Location:
e32math.h
Link against: euser.lib
TRealX
Supported from 5.0
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.
Defined in TRealX:
Add(), AddEq(), Div(), DivEq(), GetTReal(), IsFinite(), IsInFinite(), IsNaN(), IsZero(), Mod(), ModEq(), Mult(), MultEq(), Set(), SetInfinite(), SetNaN(), SetZero(), Sub(), SubEq(), TRealX(), operator TInt(), operator TInt64(), operator TReal32(), operator TReal64(), operator TUint(), operator!=(), operator%(), operator%=(), operator*(), operator*=(), operator+(), operator++(), operator++(TInt), operator+=(), operator-(), operator--(), operator--(TInt), operator-=(), operator/(), operator/=(), operator<(), operator<=(), operator==(), operator>(), operator>=()
TRealX(TInt aInt);
Constructs an extended precision object from a signed integer value.
|
TRealX(TUint aInt);
Constructs an extended precision object from an unsigned integer value.
|
TRealX(TUint aExp, TUint aMantHi, TUint aMantLo);
Constructs an extended precision object from an explicit exponent and a 64 bit mantissa.
|
TRealX(const TInt64& aInt);
Constructs an extended precision object from a 64 bit integer.
|
TRealX(TReal32 aReal);
Constructs an extended precision object from a single precision floating point number.
|
TRealX(TReal64 aReal);
Constructs an extended precision object from a double precision floating point number.
|
TInt Set(TInt aInt);
Gives this extended precision object a new value taken from a signed integer.
|
|
TInt Set(TUint aInt);
Gives this extended precision object a new value taken from an unsigned integer.
|
|
TInt Set(const TInt64& aInt);
Gives this extended precision object a new value taken from a 64 bit integer.
|
|
TInt Set(TReal32 aReal);
Gives this extended precision object a new value taken from a single precision floating point number.
|
|
TInt Set(TReal64 aReal);
Gives this extended precision object a new value taken from a double precision floating point number.
|
|
void SetZero(TBool aNegative=EFalse);
Sets the value of this extended precision object to zero.
|
void SetInfinite(TBool aNegative);
Sets the value of this extended precision object to infinity.
|
operator TInt();
Returns the extended precision value as a signed integer value.
The operator returns:
zero , if the extended precision value is not a number
0x7FFFFFFF, if the value is positive and too big to fit
into aTInt.
0x80000000, if the value is negative and too big to fit
into aTInt.
operator TUint();
Returns the extended precision value as an unsigned signed integer value.
The operator returns:
zero, if the extended precision value is not a number
0xFFFFFFFF, if the value is positive and too big to fit
into aTUint.
zero, if the value is negative and too big to fit into
aTUint.
operator TInt64();
Returns the extended precision value as a 64 bit integer value.
The operator returns:
zero, if the extended precision value is not a number
0x7FFFFFFF FFFFFFFF, if the value is positive and too big
to fit into aTInt64
0x80000000 00000000, if the value is negative and too big
to fit into aTInt.
operator TReal32();
Returns the extended precision value as a single precision floating point value.
TInt GetTReal(TReal32& aVal) const;
Extracts the extended precision value as a single precision floating point value.
|
|
operator TReal64();
Returns the extended precision value as a double precision floating point value.
TInt GetTReal(TReal64& aVal) const;
Extracts the extended precision value as a double precision floating point value.
|
|
TBool IsZero() const;
Determines whether the extended precision value is zero.
|
TBool IsNaN() const;
Determines whether the extended precision value is not a number.
|
TBool IsFinite() const;
Determines whether the extended precision value has a finite value.
|
TBool IsInfinite() const;
Determines whether the extended precision value has an infinite value.
|
const TRealX& operator+=(const TRealX& aVal);
Adds an extended precision value to this extended precision number.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in underflow.
|
|
const TRealX& operator-=(const TRealX& aVal);
Subtracts an extended precision value from this extended precision number.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in underflow.
|
|
const TRealX& operator*=(const TRealX& aVal);
Multiplies this extended precision number by an extended precision value.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in underflow.
|
|
const TRealX& operator/=(const TRealX& aVal);
Divides this extended precision number by an extended precision value.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in underflow.
MATHX KErrDivideByZero panic if the divisor is
zero.
|
|
const TRealX& operator%=(const TRealX& aVal);
Modulo-divides this extended precision number by an extended precision value.
The operator raises a:
MATHX KErrTotalLossOfPrecision panic if
precision is lost.
MATHX KErrUnderflow panic if the operation
results in underflow.
|
|
TRealX operator+() const;
Returns this extended precision number unchanged.
|
TRealX operator-() const;
Negates this extended precision number.
|
TRealX& operator++();
Increments this extended precision number by one and returns a reference to it.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in overflow.
|
TRealX operator++(TInt);
Returns this extended precision number before incrementing it by one.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in underflow.
|
TRealX& operator--();
Decrements this extended precision number by one and returns a reference to it.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in underflow.
|
TRealX operator--(TInt);
Returns this extended precision number before decrementing it by one.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in underflow.
|
TRealX operator+(const TRealX& aVal) const;
Adds an extended precision value to this extended precision number.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in underflow.
|
|
TRealX operator-(const TRealX& aVal) const;
Subtracts an extended precision value from this extended precision number.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in underflow.
|
|
TRealX operator*(const TRealX& aVal) const;
Multiplies this extended precision number by an extended precision value.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in underflow.
|
|
TRealX operator/(const TRealX& aVal) const;
Divides this extended precision number by an extended precision value.
The operator raises a:
MATHX KErrOverflow panic if the operation
results in overflow.
MATHX KErrUnderflow panic if the operation
results in underflow.
MATHX KErrDivideByZero panic if the divisor is
zero.
|
|
TRealX operator%(const TRealX& aVal) const;
Modulo-divides this extended precision number by an extended precision value.
The operator raises a:
MATHX KErrTotalLossOfPrecision panic if
precision is lost.
MATHX KErrUnderflow panic if the operation
results in underflow.
|
|
TInt AddEq(const TRealX& aVal);
Adds an extended precision value to this extended precision number.
|
|
TInt SubEq(const TRealX& aVal);
Subtracts an extended precision value from this extended precision number.
|
|
TInt MultEq(const TRealX& aVal);
Multiplies this extended precision number by an extended precision value.
|
|
TInt DivEq(const TRealX& aVal);
Divides this extended precision number by an extended precision value.
|
|
TInt ModEq(const TRealX& aVal);
Modulo-divides this extended precision number by an extended precision value.
|
|
TInt Add(TRealX& aResult,const TRealX& aVal) const;
Adds an extended precision value to this extended precision number.
|
|
TInt Sub(TRealX& aResult,const TRealX& aVal) const;
Subtracts an extended precision value from this extended precision number.
|
|
TInt Mult(TRealX& aResult,const TRealX& aVal) const;
Multiplies this extended precision number by an extended precision value.
|
|
TInt Div(TRealX& aResult,const TRealX& aVal) const;
Divides this extended precision number by an extended precision value.
|
|
TInt Mod(TRealX& aResult,const TRealX& aVal) const;
Modulo-divides this extended precision number by an extended precision value.
|
|
TBool operator==(const TRealX& aVal) const;
Compares this extended precision number for equality with another.
|
|
TBool operator!=(const TRealX& aVal) const;
Compares this extended precision number for in-equality with another.
|
|
TBool operator>=(const TRealX& aVal) const;
Compares this extended precision number for being greater than or equal to another.
|
|
TBool operator<=(const TRealX& aVal) const;
Compares this extended precision number for being less than or equal to another.
|
|
TBool operator>(const TRealX& aVal) const;
Compares this extended precision number for being greater than another.
|
|
TBool operator<(const TRealX& aVal) const;
Compares this extended precision number for being less than another.
|
|