os/kernelhwsrv/kerneltest/f32test/math/t_vals.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/f32test/math/t_vals.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,91 @@
     1.4 +// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// f32test\math\t_vals.h
    1.18 +// SPECVALS.H - special values for TReal32 and TReal64 tests
    1.19 +// Generated by \E32\TMATH\T_GEN.MAK 
    1.20 +// 
    1.21 +//
    1.22 +
    1.23 +
    1.24 +#include <e32std.h>
    1.25 +
    1.26 +class TInt32x
    1.27 +	{
    1.28 +public:
    1.29 +	TInt32x(TInt32 aInt) {iInt=aInt;}
    1.30 +public:
    1.31 +	TInt32 iInt;
    1.32 +	};
    1.33 +
    1.34 +#if defined (__DOUBLE_WORDS_SWAPPED__)
    1.35 +
    1.36 +// for ARM (big-endian doubles)
    1.37 +
    1.38 +const TInt64 minTReal32in64 = MAKE_TINT64(0x0,0x38100000);
    1.39 +const TInt64 maxTReal32in64 = MAKE_TINT64(0xe0000000,0x47efffff);
    1.40 +const TInt64 sqrtMaxTReal64 = MAKE_TINT64(0xffd9c605,0x5fefffff);
    1.41 +const TInt64 sqrtMinTReal64 = MAKE_TINT64(0x0,0x20000000);
    1.42 +const TInt64 negZeroTReal64 = MAKE_TINT64(0x0,0x80000000);
    1.43 +const TInt64 posInfTReal64 = MAKE_TINT64(0x0,0x7ff00000);
    1.44 +const TInt64 negInfTReal64 = MAKE_TINT64(0x0,0xfff00000);
    1.45 +const TInt64 NaNTReal64 = MAKE_TINT64(0xffffffff,0x7fffffff);
    1.46 +const TInt32x sqrtMaxTReal32 = TInt32x(0x5f7ffffd);
    1.47 +const TInt32x sqrtMinTReal32 = TInt32x(0x20000000);
    1.48 +const TInt32x negZeroTReal32 = TInt32x(0x80000000);
    1.49 +const TReal64 KMinTReal32in64 = *(TReal64*)&minTReal32in64;
    1.50 +const TReal64 KMaxTReal32in64 = *(TReal64*)&maxTReal32in64;
    1.51 +const TReal64 KSqrtMaxTReal64 = *(TReal64*)&sqrtMaxTReal64;
    1.52 +const TReal64 KSqrtMinTReal64 = *(TReal64*)&sqrtMinTReal64;
    1.53 +const TReal64 KNegZeroTReal64 = *(TReal64*)&negZeroTReal64;
    1.54 +const TReal64 KPosInfTReal64 = *(TReal64*)&posInfTReal64;
    1.55 +const TReal64 KNegInfTReal64 = *(TReal64*)&negInfTReal64;
    1.56 +const TReal64 KNaNTReal64 = *(TReal64*)&NaNTReal64;
    1.57 +const TReal32 KSqrtMaxTReal32 = *(TReal32*)&sqrtMaxTReal32;
    1.58 +const TReal32 KSqrtMinTReal32 = *(TReal32*)&sqrtMinTReal32;
    1.59 +const TReal32 KNegZeroTReal32 = *(TReal32*)&negZeroTReal32;
    1.60 +const TReal KMinTReal32inTReal = TReal(KMinTReal32in64);
    1.61 +const TReal KMaxTReal32inTReal = TReal(KMaxTReal32in64);
    1.62 +const TReal KNegZeroTReal = TReal(KNegZeroTReal64);
    1.63 +
    1.64 +#else	// NOT #if defined (__DOUBLE_WORDS_SWAPPED__)
    1.65 +
    1.66 +// for WINS and X86 (little-endian doubles) 
    1.67 +
    1.68 +const TInt64 minTReal32in64 = MAKE_TINT64(0x38100000,0x0);
    1.69 +const TInt64 maxTReal32in64 = MAKE_TINT64(0x47efffff,0xe0000000);
    1.70 +const TInt64 sqrtMaxTReal64 = MAKE_TINT64(0x5fefffff,0xffd9c605);
    1.71 +const TInt64 sqrtMinTReal64 = MAKE_TINT64(0x20000000,0x0);
    1.72 +const TInt64 negZeroTReal64 = MAKE_TINT64(0x80000000,0x0);
    1.73 +const TInt64 posInfTReal64 = MAKE_TINT64(0x7ff00000,0x0);
    1.74 +const TInt64 negInfTReal64 = MAKE_TINT64(0xfff00000,0x0);
    1.75 +const TInt64 NaNTReal64 = MAKE_TINT64(0x7fffffff,0xffffffff);
    1.76 +const TInt32x sqrtMaxTReal32 = TInt32x(0x5f7ffffd);
    1.77 +const TInt32x sqrtMinTReal32 = TInt32x(0x20000000);
    1.78 +const TInt32x negZeroTReal32 = TInt32x(0x80000000);
    1.79 +const TReal64 KMinTReal32in64 = *(TReal64*)&minTReal32in64;
    1.80 +const TReal64 KMaxTReal32in64 = *(TReal64*)&maxTReal32in64;
    1.81 +const TReal64 KSqrtMaxTReal64 = *(TReal64*)&sqrtMaxTReal64;
    1.82 +const TReal64 KSqrtMinTReal64 = *(TReal64*)&sqrtMinTReal64;
    1.83 +const TReal64 KNegZeroTReal64 = *(TReal64*)&negZeroTReal64;
    1.84 +const TReal64 KPosInfTReal64 = *(TReal64*)&posInfTReal64;
    1.85 +const TReal64 KNegInfTReal64 = *(TReal64*)&negInfTReal64;
    1.86 +const TReal64 KNaNTReal64 = *(TReal64*)&NaNTReal64;
    1.87 +const TReal32 KSqrtMaxTReal32 = *(TReal32*)&sqrtMaxTReal32;
    1.88 +const TReal32 KSqrtMinTReal32 = *(TReal32*)&sqrtMinTReal32;
    1.89 +const TReal32 KNegZeroTReal32 = *(TReal32*)&negZeroTReal32;
    1.90 +const TReal KMinTReal32inTReal = TReal(KMinTReal32in64);
    1.91 +const TReal KMaxTReal32inTReal = TReal(KMaxTReal32in64);
    1.92 +const TReal KNegZeroTReal = TReal(KNegZeroTReal64);
    1.93 +
    1.94 +#endif