162const TReal
KMinTReal=2.2250738585072015E-308;
171const TReal
KMaxTReal=1.7976931348623157E+308;
190const TReal32
KMaxTReal32=3.4028234663852885981170418348452e+38f;
217const TReal
KSqhf=0.70710678118654752440;
226const TReal
KRln2=1.4426950408889634;
235const TReal
KRln10=0.4342944819032518;
244const TReal
KRlg2=0.3010299956639812;
253const TReal
KPi=3.1415926535897932;
262const TReal
KPiInv=0.3183098861837907;
271const TReal
KPiBy2=1.5707963267948966;
280const TReal
KDrpi=0.6366197723675813;
289const TReal
KSqt3=1.7320508075688773;
296const TReal
KMsq3=0.2679491924311227;
314const TReal
KDegToRad=0.017453292519943296;
334 IMPORT_C
TRealX(TInt aInt);
335 IMPORT_C
TRealX(TUint aInt);
336 IMPORT_C
TRealX(TUint aExp, TUint aMantHi, TUint aMantLo);
337 IMPORT_C
TRealX(
const TInt64 &aInt);
338 IMPORT_C
TRealX(TReal32 aReal) __SOFTFP;
339 IMPORT_C
TRealX(TReal64 aReal) __SOFTFP;
345 IMPORT_C TInt
Set(TInt aInt);
346 IMPORT_C TInt
Set(TUint aInt);
347 IMPORT_C TInt
Set(
const TInt64& aInt);
348 IMPORT_C TInt
Set(TReal32 aReal) __SOFTFP;
349 IMPORT_C TInt
Set(TReal64 aReal) __SOFTFP;
350 IMPORT_C
operator TInt()
const;
351 IMPORT_C
operator TUint()
const;
352 IMPORT_C
operator TInt64()
const;
353 IMPORT_C
operator TReal32() const __SOFTFP;
354 IMPORT_C operator TReal64() const __SOFTFP;
355 IMPORT_C TInt
GetTReal(TReal32 &aVal) const;
356 IMPORT_C TInt
GetTReal(TReal64 &aVal) const;
357 IMPORT_C
void SetZero(TBool aNegative=EFalse);
360 IMPORT_C TBool
IsZero() const;
361 IMPORT_C TBool
IsNaN() const;
374 IMPORT_C
TRealX operator+() const;
375 IMPORT_C
TRealX operator-() const;
376 IMPORT_C
TRealX &operator++();
377 IMPORT_C
TRealX operator++(TInt);
378 IMPORT_C
TRealX &operator--();
379 IMPORT_C
TRealX operator--(TInt);
391 inline TBool operator==(const
TRealX &aVal) const;
392 inline TBool operator!=(const
TRealX &aVal) const;
393 inline TBool operator>=(const
TRealX &aVal) const;
394 inline TBool operator<=(const
TRealX &aVal) const;
395 inline TBool operator>(const
TRealX &aVal) const;
396 inline TBool operator<(const
TRealX &aVal) const;
454 IMPORT_C
static TInt ACos(TReal &aTrg,
const TReal &aSrc);
455 IMPORT_C
static TInt ASin(TReal &aTrg,
const TReal &aSrc);
456 IMPORT_C
static TInt ATan(TReal &aTrg,
const TReal &aSrc);
457 IMPORT_C
static TInt ATan(TReal &aTrg,
const TReal &aSrcY,
const TReal &aSrcX);
458 IMPORT_C
static TInt Cos(TReal &aTrg,
const TReal &aSrc);
459 IMPORT_C
static TInt Exp(TReal &aTrg,
const TReal &aSrc);
460 IMPORT_C
static TInt Frac(TReal &aTrg,
const TReal &aSrc);
461 IMPORT_C
static TInt Int(TReal &aTrg,
const TReal &aSrc);
462 IMPORT_C
static TInt Int(TInt16 &aTrg,
const TReal &aSrc);
463 IMPORT_C
static TInt Int(TInt32 &aTrg,
const TReal &aSrc);
464 IMPORT_C
static TInt Log(TReal &aTrg,
const TReal &aSrc);
465 IMPORT_C
static TInt Ln(TReal &aTrg,
const TReal &aSrc);
466 IMPORT_C
static TInt Mod(TReal &aTrg,
const TReal &aSrc,
const TReal &aModulus);
467 IMPORT_C
static TReal Poly(TReal aVal,
const SPoly *aPoly) __SOFTFP;
468 IMPORT_C
static TInt Pow(TReal &aTrg,
const TReal &aSrc,
const TReal &aPower);
469 IMPORT_C
static TInt Pow10(TReal &aTrg,
const TInt exp);
470 IMPORT_C
static TInt Rand(TInt64 &aSeed);
471 IMPORT_C
static TReal FRand(TInt64 &aSeed) __SOFTFP;
472 IMPORT_C
static TUint32 Random();
473 IMPORT_C
static void Random(TDes8& aRandomValue);
474 IMPORT_C
static void RandomL(TDes8& aRandomValue);
475 IMPORT_C
static TUint32 RandomL();
476 IMPORT_C
static TInt Round(TReal &aTrg,
const TReal &aSrc,TInt aDecimalPlaces);
477 IMPORT_C
static TInt Sin(TReal &aTrg,
const TReal &aSrc);
478 IMPORT_C
static TInt Sqrt(TReal &aTrg,
const TReal &aSrc);
479 IMPORT_C
static TInt Tan(TReal &aTrg,
const TReal &aSrc);
480 IMPORT_C
static TBool IsZero(
const TReal &aVal);
481 IMPORT_C
static TBool IsNaN(
const TReal &aVal);
482 IMPORT_C
static TBool IsInfinite(
const TReal &aVal);
483 IMPORT_C
static TBool IsFinite(
const TReal &aVal);
485 static TInt MultPow10X(
TRealX& aTrg, TInt aPower);
486 IMPORT_C
static void Mul64(Int64 aX, Int64 aY, Int64& aOutH, Uint64& aOutL);
487 IMPORT_C
static void UMul64(Uint64 aX, Uint64 aY, Uint64& aOutH, Uint64& aOutL);
488 IMPORT_C
static Int64 DivMod64(Int64 aDividend, Int64 aDivisor, Int64& aRemainder);
489 IMPORT_C
static Uint64 UDivMod64(Uint64 aDividend, Uint64 aDivisor, Uint64& aRemainder);
491 IMPORT_C
static void SetZero(TReal &aVal,TInt aSign=0);
492 IMPORT_C
static void SetNaN(TReal &aVal);
493 IMPORT_C
static void SetInfinite(TReal &aVal,TInt aSign);
496#include <e32math.inl>
A collection of mathematical functions.
A class encapsulating an extended precision real value.
IMPORT_C TInt AddEq(const TRealX &aVal)
Adds an extended precision value to this extended precision number.
IMPORT_C TInt GetTReal(TReal32 &aVal) const
Extracts the extended precision value as a single precision floating point value.
IMPORT_C TInt Add(TRealX &aResult, const TRealX &aVal) const
Adds an extended precision value to this extended precision number.
IMPORT_C TInt MultEq(const TRealX &aVal)
Multiplies this extended precision number by an extended precision value.
IMPORT_C TInt DivEq(const TRealX &aVal)
Divides this extended precision number by an extended precision value.
TUint8 iFlag
Flags: 0 for exact, 1 for rounded down, 2 for rounded up.
TUint16 iExp
Exponent: biased by 32767, iExp=0 => zero, +65535 => infinity or NaN.
IMPORT_C TRealX()
Constructs a default extended precision object.
IMPORT_C TInt ModEq(const TRealX &aVal)
Modulo-divides this extended precision number by an extended precision value.
IMPORT_C void SetZero(TBool aNegative=EFalse)
Sets the value of this extended precision object to zero.
IMPORT_C void SetNaN()
Sets the value of this extended precision object to 'not a number'.
IMPORT_C TInt Sub(TRealX &aResult, const TRealX &aVal) const
Subtracts an extended precision value from this extended precision number.
TUint32 iMantLo
The mantissa.
IMPORT_C TInt Mult(TRealX &aResult, const TRealX &aVal) const
Multiplies this extended precision number by an extended precision value.
TInt8 iSign
The sign: 0 for +, 1 for -.
IMPORT_C TInt Mod(TRealX &aResult, const TRealX &aVal) const
Modulo-divides this extended precision number by an extended precision value.
IMPORT_C TBool IsInfinite() const
Determines whether the extended precision value has a finite value.
IMPORT_C TInt SubEq(const TRealX &aVal)
Subtracts an extended precision value from this extended precision number.
IMPORT_C TInt Div(TRealX &aResult, const TRealX &aVal) const
Divides this extended precision number by an extended precision value.
IMPORT_C TBool IsFinite() const
Determines whether the extended precision value has a finite value.
IMPORT_C TBool IsZero() const
Determines whether the extended precision value is zero.
IMPORT_C TRealX & operator=(TInt aInt)
Assigns the specified signed integer value to this extended precision object.
IMPORT_C TInt Set(TInt aInt)
Gives this extended precision object a new value taken from a signed integer.
IMPORT_C void SetInfinite(TBool aNegative)
Sets the value of this extended precision object to infinity.
IMPORT_C TRealXOrder Compare(const TRealX &aVal) const
IMPORT_C TBool IsNaN() const
Determines whether the extended precision value is 'not a number'.
const TReal32 KMinTReal32
The minimum value of a 32-bit floating point number.
const TInt KTReal64MaxExponent
The maximum exponent for a 64-bit floating point number.
const TReal KRadToDeg
The multiplying factor to convert radians to degrees.
const TInt KTReal64MinExponent
The minimum exponent for a 64-bit floating point number.
const TReal KMinTReal
The minimum value of a 64-bit floating point number.
const TReal KPi
The mathematical constant Pi.
const TReal KMaxTReal
The maximum value of a 64-bit floating point number.
const TInt KTReal32ExponentBias
const TReal KPiInv
The reciprocal of the mathematical constant Pi.
const TReal64 KMinTReal64
The minimum value of a 64-bit floating point number.
const TReal KRln2
Log 2 to the base "e".
const TInt KTReal32SpecialExponent
const TInt KTReal32MaxExponent
The maximum exponent for a 32-bit floating point number.
const TInt KIEEEDoubleInjectivePrecision
Let D be the set of real numbers exactly representable by an IEEE-754 'double' For any positive integ...
const TInt KTReal64SpecialExponent
const TInt KTReal64ZeroExponent
A zero exponent value for a 64-bit floating point number.
const TReal KSqt3
The square root of 3.
const TInt KTReal32MinExponent
The minimum exponent for a 32-bit floating point number.
const TReal32 KMaxTReal32
The maximum value of a 32-bit floating point number.
const TReal KDegToRad
The multiplying factor to convert degrees to radians.
const TReal KPiBy2
The mathematical constant Pi divided by 2.
const TReal64 KMaxTReal64
The maximum value of a 64-bit floating point number.
const TInt KSpecialExponent
const TInt KTReal32ZeroExponent
A zero exponent value for a 32-bit floating point number.
const TReal KRlg2
Log 2 to the base 10.
const TInt KTReal64ExponentBias
const TReal KRln10
Log 10 to the base "e".
const TReal KDrpi
Not used.
const TInt KPrecisionLimit
This constant specifies the maximum number of significant digits available with floating point comput...
A structure containing the set of coefficients for a polynomial.