0
|
1 |
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// f32test\math\t_r64dta.cpp
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#include <e32math.h>
|
|
19 |
#include "t_vals.h"
|
|
20 |
|
|
21 |
GLDEF_D TReal64 addInput[]=
|
|
22 |
{
|
|
23 |
KMaxTReal64/2,KMaxTReal64/2,
|
|
24 |
-KMaxTReal64/2,-KMaxTReal64/2,
|
|
25 |
-KMinTReal64,-KMinTReal64,
|
|
26 |
KMinTReal64,KMinTReal64,
|
|
27 |
KMinTReal64*2,-KMinTReal64,
|
|
28 |
0.0, 0.0,
|
|
29 |
KMaxTReal64,-KMaxTReal64,
|
|
30 |
0.0, 1.0,
|
|
31 |
1.9999999999999997, 2.0,
|
|
32 |
-1.9999999999999997, -2.0,
|
|
33 |
0.029345, 0.029345,
|
|
34 |
5.2972514E+164, 5.2972514E+164, // These numbers are sufficiently close
|
|
35 |
3.478065637643E+151, 3.478065637643E+151, //
|
|
36 |
-3.478065637643E+151, -3.478065637643E+151, // to alter each other in addition...
|
|
37 |
9.8976E+138, -9.8976E+138,
|
|
38 |
1.23472E+7, 1.23472E+7,
|
|
39 |
3.19852E-6, -3.19852E-6,
|
|
40 |
1.39792E-19, 4.9761418241916116E-304,
|
|
41 |
5.2972514E+164, 5.2972514E+164, // and these are not.
|
|
42 |
3.478065637643E+150, 3.478065637643E+150,
|
|
43 |
-3.478065637643E+150, -3.478065637643E+150,
|
|
44 |
9.8976E+135, -9.8976E+135,
|
|
45 |
1.23472E+7, 1.23472E+7,
|
|
46 |
3.19852E-7, 3.19852E-7,
|
|
47 |
1.39792E-21, 4.9761418241916116E-304,
|
|
48 |
0.0,KNegZeroTReal64,
|
|
49 |
};
|
|
50 |
|
|
51 |
//{-3.478065637643E+150,9.8976E+135} - These value used to fail when rounding up
|
|
52 |
|
|
53 |
GLDEF_D TReal64 subInput[] =
|
|
54 |
{
|
|
55 |
KMaxTReal64/2, -KMaxTReal64/2,
|
|
56 |
0.0, 0.0,
|
|
57 |
KMaxTReal64, KMaxTReal64,
|
|
58 |
1.0E+252, -1.0E+252,
|
|
59 |
-KMaxTReal64, -KMaxTReal64,
|
|
60 |
KMinTReal64, KMinTReal64,
|
|
61 |
-KMinTReal64, -KMinTReal64,
|
|
62 |
0.0, 0.0,
|
|
63 |
2*KMinTReal64, KMinTReal64,
|
|
64 |
-2*KMinTReal64, -KMinTReal64,
|
|
65 |
1.0, 4.5,
|
|
66 |
1.9999999999999997, 2.0,
|
|
67 |
-1.9999999999999997, -2.0,
|
|
68 |
0.029345, 0.029345,
|
|
69 |
5.2972514E+164, 5.2972514E+164, // These numbers are sufficiently close
|
|
70 |
3.478065637643E+151, 3.478065637643E+151, //
|
|
71 |
-3.478065637643E+151, -3.478065637643E+151, // to alter each other in addition...
|
|
72 |
9.8976E+138, -9.8976E+138,
|
|
73 |
1.23472E+7, 1.23472E+7,
|
|
74 |
3.19852E-6, -3.19852E-6,
|
|
75 |
1.39792E-19, 4.9761418241916116E-304,
|
|
76 |
5.2972514E+164, 5.2972514E+164, // and these are not.
|
|
77 |
3.478065637643E+150, 3.478065637643E+150,
|
|
78 |
-3.478065637643E+150, -3.478065637643E+150,
|
|
79 |
9.8976E+135, -9.8976E+135,
|
|
80 |
1.23472E+7, 1.23472E+7,
|
|
81 |
3.19852E-7, 3.19852E-7,
|
|
82 |
1.39792E-21, 4.9761418241916116E-304,
|
|
83 |
0.0,KNegZeroTReal64,
|
|
84 |
};
|
|
85 |
|
|
86 |
// {4.5,1.9999999999999997} - These values used to fail when rounding up
|
|
87 |
|
|
88 |
GLDEF_D TReal64 multInput[]=
|
|
89 |
{
|
|
90 |
5066549580791808.0,4503599627370500.0,
|
|
91 |
1.0,1.0,
|
|
92 |
0.0, 0.0,
|
|
93 |
KSqrtMaxTReal64, KSqrtMaxTReal64,
|
|
94 |
-KSqrtMaxTReal64, -KSqrtMaxTReal64,
|
|
95 |
KSqrtMinTReal64, KSqrtMinTReal64,
|
|
96 |
-KSqrtMinTReal64, -KSqrtMinTReal64,
|
|
97 |
1.0, KMaxTReal64,
|
|
98 |
0.0, KMinTReal64,
|
|
99 |
1.0, 4.5,
|
|
100 |
KMinTReal64, KMaxTReal64,
|
|
101 |
1.0, 0.9999999999999997,
|
|
102 |
-1.0, -0.9999999999999997,
|
|
103 |
0.029345, 0.029345,
|
|
104 |
3.478065637643E+19, 3.478065637643E+19,
|
|
105 |
-3.478065637643E+19, -3.478065637643E+19,
|
|
106 |
-0.98976, -0.98976,
|
|
107 |
-3.2774997937E+285, -3.2774997937E-285,
|
|
108 |
4.20761202627E+29, 4.20761202627E-29,
|
|
109 |
-2.634209025E+202, 2.634209025E-202, // These pairs fail in ARM
|
|
110 |
3.1972712525626E+5, 1.39720715521579E+301,
|
|
111 |
3.1972712525626E-5, 1.39720715521579E-301,
|
|
112 |
4.2720759210720E+184, 3.9275015971055E+122, //
|
|
113 |
4.2720759210720E-184, 3.9275015971055E-122, //
|
|
114 |
0.0,KNegZeroTReal64,
|
|
115 |
2.0,0.0,
|
|
116 |
};
|
|
117 |
|
|
118 |
//{5066549580791808.0,4503599627370500.0} - This case used to fail when rounding up
|
|
119 |
//{-2.634209025E+202, 2.634209025E-202} - This pair used to fail due to MulTop bug
|
|
120 |
//{4.2720759210720E+184, 3.9275015971055E+122} - ditto
|
|
121 |
//{4.2720759210720E-184, 3.9275015971055E-122} - ditto
|
|
122 |
|
|
123 |
GLDEF_D TReal64 divInput[]=
|
|
124 |
{
|
|
125 |
0.0, 0.0,
|
|
126 |
KMaxTReal64, KMaxTReal64,
|
|
127 |
-KMaxTReal64, -KMaxTReal64,
|
|
128 |
4.0, KMaxTReal64,
|
|
129 |
0.0, 1.0,
|
|
130 |
-KMinTReal64, 1.0,
|
|
131 |
KMinTReal64,KMinTReal64,
|
|
132 |
-KMinTReal64, -KMinTReal64,
|
|
133 |
0.0, 1.0,
|
|
134 |
1.0, 0.9999999999999997,
|
|
135 |
-1.0, -0.9999999999999997,
|
|
136 |
1.0, -1.0,
|
|
137 |
0.029345, 0.029345,
|
|
138 |
-2.634209025E-295, -2.634209027E-295,
|
|
139 |
2.634209025E-295, 2.634209027E-295,
|
|
140 |
-0.98976, -0.98976,
|
|
141 |
3.478065637643E+19, 3.478065637643E+19,
|
|
142 |
3.478065637643E-12,3.478065637644E-12,
|
|
143 |
-3.2774997937E+53, -3.2774997937E+53,
|
|
144 |
-3.2774997937E+153, -3.2774997937E-153,
|
|
145 |
4.20761202627E+29, 4.20761202627E-29,
|
|
146 |
-4.20761202627E+29, -4.20761202627E-29,
|
|
147 |
-2.634209025E+78, 2.634209025E-78,
|
|
148 |
3.1972712525626E-5, 1.39720715521579E+301,
|
|
149 |
3.1972712525626E+5, 1.39720715521579E-301,
|
|
150 |
4.2720759210720E-184, 3.9275015971055E+122,
|
|
151 |
4.2720759210720E+184, 3.9275015971055E-122,
|
|
152 |
0.0,KNegZeroTReal64,
|
|
153 |
2.0,0.0
|
|
154 |
};
|
|
155 |
|
|
156 |
//{-KMaxTReal64,4.0} - This pair used to fail before division bug fixed
|
|
157 |
//{4.0, KMaxTReal64} - ditto
|
|
158 |
|
|
159 |
GLDEF_D TReal64 unaryInput[] =
|
|
160 |
{0.0,1.0,-1.0,KMaxTReal64,-KMaxTReal64,KMinTReal64,-KMinTReal64};
|
|
161 |
|
|
162 |
GLDEF_D TReal64 incDecInput[] =
|
|
163 |
{0.0,-1.0,1.0,2.0,KMaxTReal64,-KMaxTReal64,KMinTReal64,-KMinTReal64,
|
|
164 |
-1672.7577037402694720,1612.8210207019271364,
|
|
165 |
9.0E+14,-9.0E+14,9.0E-14,-9.0E-14,
|
|
166 |
9.0E+16,-9.0E+16,9.0E-16,-9.0E-16};
|
|
167 |
|
|
168 |
GLDEF_D TInt sizeAdd = sizeof(addInput)/sizeof(TReal64);
|
|
169 |
GLDEF_D TInt sizeSub = sizeof(subInput)/sizeof(TReal64);
|
|
170 |
GLDEF_D TInt sizeMult = sizeof(multInput)/sizeof(TReal64);
|
|
171 |
GLDEF_D TInt sizeDiv = sizeof(divInput)/sizeof(TReal64);
|
|
172 |
GLDEF_D TInt sizeUnary = sizeof(unaryInput)/sizeof(TReal64);
|
|
173 |
GLDEF_D TInt sizeIncDec = sizeof(incDecInput)/sizeof(TReal64);
|