sl@0
|
1 |
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// f32test\math\t_r32dta.cpp
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <e32math.h>
|
sl@0
|
20 |
#include "t_vals.h"
|
sl@0
|
21 |
|
sl@0
|
22 |
GLDEF_D TReal32 addInput[]=
|
sl@0
|
23 |
{
|
sl@0
|
24 |
KMaxTReal32/2,KMaxTReal32/2,
|
sl@0
|
25 |
-KMaxTReal32/2,-KMaxTReal32/2,
|
sl@0
|
26 |
-KMinTReal32,-KMinTReal32,
|
sl@0
|
27 |
KMinTReal32,KMinTReal32,
|
sl@0
|
28 |
KMinTReal32*2,-KMinTReal32,
|
sl@0
|
29 |
0.0f, 0.0f,
|
sl@0
|
30 |
KMaxTReal32,-KMaxTReal32,
|
sl@0
|
31 |
0.0f, 1.0f,
|
sl@0
|
32 |
1.9997f, 2.0f,
|
sl@0
|
33 |
-1.99997f, -2.0f,
|
sl@0
|
34 |
0.029345f, 0.029345f,
|
sl@0
|
35 |
5.2972514E+37f, 5.2972514E+37f, // These numbers are sufficiently close
|
sl@0
|
36 |
3.4780656E+32f, 3.4780656E+32f, //
|
sl@0
|
37 |
-3.4780656E+32f, -3.4780656E+32f, // to alter each other in addition...
|
sl@0
|
38 |
9.8976E+26f, -9.8976E+26f,
|
sl@0
|
39 |
1.23472E-9f, 1.23472E-9f,
|
sl@0
|
40 |
3.19852E-14f, -3.19852E-14f,
|
sl@0
|
41 |
1.39792E-19f, 4.9761418E-37f,
|
sl@0
|
42 |
5.2972514E+37f, 5.2972514E+37f, // and these are not.
|
sl@0
|
43 |
3.4780656E+29f, 3.4780656E+29f,
|
sl@0
|
44 |
-3.4780656E+29f, -3.4780656E+29f,
|
sl@0
|
45 |
9.8976E+21f, -9.8976E+21f,
|
sl@0
|
46 |
1.23472E-5f, 1.23472E-5f,
|
sl@0
|
47 |
3.19852E-13f, 3.19852E-13f,
|
sl@0
|
48 |
1.39792E-21f, 4.9761418E-37f
|
sl@0
|
49 |
};
|
sl@0
|
50 |
|
sl@0
|
51 |
GLDEF_D TReal32 subInput[] =
|
sl@0
|
52 |
{
|
sl@0
|
53 |
KMaxTReal32/2, -KMaxTReal32/2,
|
sl@0
|
54 |
0.0f,0.0f,
|
sl@0
|
55 |
KMaxTReal32, KMaxTReal32,
|
sl@0
|
56 |
1.0E+25f, -1.0E+25f,
|
sl@0
|
57 |
-KMaxTReal32, -KMaxTReal32,
|
sl@0
|
58 |
KMinTReal32, KMinTReal32,
|
sl@0
|
59 |
-KMinTReal32, -KMinTReal32,
|
sl@0
|
60 |
0.0f, 0.0f,
|
sl@0
|
61 |
2*KMinTReal32, KMinTReal32,
|
sl@0
|
62 |
-2*KMinTReal32, -KMinTReal32,
|
sl@0
|
63 |
1.0f, 4.5f,
|
sl@0
|
64 |
1.9999997f,2.0f,
|
sl@0
|
65 |
-1.9999997f, -2.0f,
|
sl@0
|
66 |
0.029345f, 0.029345f,
|
sl@0
|
67 |
5.2972514E+37f, 5.2972514E+37f, // These numbers are sufficiently close
|
sl@0
|
68 |
3.4780656E+32f, 3.4780656E+32f, //
|
sl@0
|
69 |
-3.4780656E+32f, -3.4780656E+32f, // to alter each other in addition...
|
sl@0
|
70 |
9.8976E+27f, -9.8976E+27f,
|
sl@0
|
71 |
1.23472E-9f, 1.23472E-9f,
|
sl@0
|
72 |
3.19852E-14f, -3.19852E-14f,
|
sl@0
|
73 |
1.39792E-19f, 4.9761418E-37f,
|
sl@0
|
74 |
5.2972514E+37f, 5.2972514E+37f, // and these are not.
|
sl@0
|
75 |
3.4780656E+29f, 3.4780656E+29f,
|
sl@0
|
76 |
-3.4780656E+29f, -3.4780656E+29f,
|
sl@0
|
77 |
9.8976E+21f, -9.8976E+21f,
|
sl@0
|
78 |
1.23472E-5f, 1.23472E-5f,
|
sl@0
|
79 |
3.19852E-13f, 3.19852E-13f,
|
sl@0
|
80 |
1.39792E-21f, 4.9761418E-37f
|
sl@0
|
81 |
};
|
sl@0
|
82 |
|
sl@0
|
83 |
// {2.0f,-1.9999997f} - these values fail when rounding towards zero
|
sl@0
|
84 |
|
sl@0
|
85 |
GLDEF_D TReal32 multInput[]=
|
sl@0
|
86 |
{
|
sl@0
|
87 |
1.0f,1.0f,
|
sl@0
|
88 |
0.0f, 0.0f,
|
sl@0
|
89 |
KSqrtMaxTReal32,KSqrtMaxTReal32,
|
sl@0
|
90 |
-KSqrtMaxTReal32, -KSqrtMaxTReal32,
|
sl@0
|
91 |
KSqrtMinTReal32, KSqrtMinTReal32,
|
sl@0
|
92 |
-KSqrtMinTReal32, -KSqrtMinTReal32,
|
sl@0
|
93 |
1.0f, KMaxTReal32,
|
sl@0
|
94 |
0.0f, KMinTReal32,
|
sl@0
|
95 |
1.0f, 4.5f,
|
sl@0
|
96 |
KMinTReal32, KMaxTReal32,
|
sl@0
|
97 |
1.0f, 0.9999997f,
|
sl@0
|
98 |
-1.0f, -0.9999997f,
|
sl@0
|
99 |
0.029345f, 0.029345f,
|
sl@0
|
100 |
3.4780656E+18f, 3.4780656E+18f,
|
sl@0
|
101 |
-3.4780656E+18f, -3.4780656E+18f,
|
sl@0
|
102 |
-0.98976f, -0.98976f,
|
sl@0
|
103 |
-3.2774997E+36f, -3.2774997E-36f,
|
sl@0
|
104 |
4.2076120E+12f, 4.2076120E-12f,
|
sl@0
|
105 |
-2.6342090E+30f, 2.6342090E-30f,
|
sl@0
|
106 |
3.1972712E+5f, 1.3972071E+31f,
|
sl@0
|
107 |
3.1972712E-5f, 1.3972071E-31f,
|
sl@0
|
108 |
4.2720759E+12f, 3.9275015E+24f,
|
sl@0
|
109 |
4.2720759E-12f, 3.9275015E-24f
|
sl@0
|
110 |
};
|
sl@0
|
111 |
|
sl@0
|
112 |
GLDEF_D TReal32 divInput[]=
|
sl@0
|
113 |
{
|
sl@0
|
114 |
0.0f, 0.0f,
|
sl@0
|
115 |
KMaxTReal32, KMaxTReal32,
|
sl@0
|
116 |
-KMaxTReal32, -KMaxTReal32,
|
sl@0
|
117 |
4.0f, KMaxTReal32,
|
sl@0
|
118 |
0.0f, 1.0f,
|
sl@0
|
119 |
-KMinTReal32, 1.0f,
|
sl@0
|
120 |
KMinTReal32,KMinTReal32,
|
sl@0
|
121 |
-KMinTReal32, -KMinTReal32,
|
sl@0
|
122 |
0.0f, 1.0f,
|
sl@0
|
123 |
1.0f, 0.9999997f,
|
sl@0
|
124 |
-1.0f, -0.9999997f,
|
sl@0
|
125 |
1.0f, -1.0f,
|
sl@0
|
126 |
0.029345f, 0.029345f,
|
sl@0
|
127 |
2.6342090E-36f, 2.6342090E-36f,
|
sl@0
|
128 |
-0.98976f, -0.98976f,
|
sl@0
|
129 |
3.4780656E+19f, 3.4780656E+19f,
|
sl@0
|
130 |
3.4780656E-12f,3.4780656E-12f,
|
sl@0
|
131 |
-3.2774997E+5f, -3.2774997E+5f,
|
sl@0
|
132 |
-3.2774997E+18f, -3.2774997E-18f,
|
sl@0
|
133 |
4.2076120E+4f, 4.2076120E-4f,
|
sl@0
|
134 |
-4.2076120E+4f, -4.2076120E-4f,
|
sl@0
|
135 |
-2.6342090E+6f, 2.6342090E-6f,
|
sl@0
|
136 |
3.1972712E-2f, 1.3972071E+34f,
|
sl@0
|
137 |
3.1972712E+2f, 1.3972071E-34f,
|
sl@0
|
138 |
4.2720759E-13f, 3.927501E+23f,
|
sl@0
|
139 |
4.2720759E+13f, 3.927501E-23f
|
sl@0
|
140 |
};
|
sl@0
|
141 |
|
sl@0
|
142 |
GLDEF_D TReal32 unaryInput[] =
|
sl@0
|
143 |
{0.0f,1.0f,-1.0f,KMaxTReal32,-KMaxTReal32,KMinTReal32,-KMinTReal32};
|
sl@0
|
144 |
|
sl@0
|
145 |
GLDEF_D TReal32 incDecInput[] =
|
sl@0
|
146 |
{-1.0f,0.0f,1.0f,-1672.7577037f,1612.8210207f,
|
sl@0
|
147 |
KMaxTReal32,-KMaxTReal32,KMinTReal32,-KMinTReal32,
|
sl@0
|
148 |
9.0E+14f,-9.0E+14f,9.0E-14f,-9.0E-14f,
|
sl@0
|
149 |
9.0E+16f,-9.0E+16f,9.0E-16f,-9.0E-16f};
|
sl@0
|
150 |
|
sl@0
|
151 |
// sizes of arrays
|
sl@0
|
152 |
GLDEF_D TInt sizeAdd = sizeof(addInput)/sizeof(TReal32);
|
sl@0
|
153 |
GLDEF_D TInt sizeSub = sizeof(subInput)/sizeof(TReal32);
|
sl@0
|
154 |
GLDEF_D TInt sizeMult = sizeof(multInput)/sizeof(TReal32);
|
sl@0
|
155 |
GLDEF_D TInt sizeDiv = sizeof(divInput)/sizeof(TReal32);
|
sl@0
|
156 |
GLDEF_D TInt sizeUnary = sizeof(unaryInput)/sizeof(TReal32);
|
sl@0
|
157 |
GLDEF_D TInt sizeIncDec = sizeof(incDecInput)/sizeof(TReal32);
|