OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c4a011a.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C4A011A.ADA
2
 
3
--                             Grant of Unlimited Rights
4
--
5
--     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6
--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained 
7
--     unlimited rights in the software and documentation contained herein.
8
--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making 
9
--     this public release, the Government intends to confer upon all 
10
--     recipients unlimited rights  equal to those held by the Government.  
11
--     These rights include rights to use, duplicate, release or disclose the 
12
--     released technical data and computer software in whole or in part, in 
13
--     any manner and for any purpose whatsoever, and to have or permit others 
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
18
--     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19
--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 
20
--     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21
--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 
22
--     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23
--     PARTICULAR PURPOSE OF SAID MATERIAL.
24
--*
25
-- CHECK THAT NONSTATIC UNIVERSAL REAL EXPRESSIONS ARE EVALUATED WITH
26
-- THE ACCURACY OF THE MOST PRECISE PREDEFINED FLOATING POINT TYPE
27
-- (I. E., THE TYPE FOR WHICH 'DIGITS EQUALS SYSTEM.MAX_DIGITS).
28
 
29
-- RJW 8/4/86
30
 
31
WITH SYSTEM; USE SYSTEM;
32
WITH REPORT; USE REPORT;
33
 
34
PROCEDURE C4A011A IS
35
 
36
     TYPE MAX_FLOAT IS DIGITS MAX_DIGITS;
37
 
38
     C5L : CONSTANT := 16#0.AAAA8#;
39
     C5U : CONSTANT := 16#0.AAAAC#;
40
 
41
     C6L : CONSTANT := 16#0.AAAAA8#;
42
     C6U : CONSTANT := 16#0.AAAAB0#;
43
 
44
     C7L : CONSTANT := 16#0.AAAAAA8#;
45
     C7U : CONSTANT := 16#0.AAAAAB0#;
46
 
47
     C8L : CONSTANT := 16#0.AAAAAAA#;
48
     C8U : CONSTANT := 16#0.AAAAAAB#;
49
 
50
     C9L : CONSTANT := 16#0.AAAAAAAA#;
51
     C9U : CONSTANT := 16#0.AAAAAAAC#;
52
 
53
     C10L : CONSTANT := 16#0.AAAAAAAAA#;
54
     C10U : CONSTANT := 16#0.AAAAAAAAC#;
55
 
56
     C11L : CONSTANT := 16#0.AAAAAAAAA8#;
57
     C11U : CONSTANT := 16#0.AAAAAAAAAC#;
58
 
59
     C12L : CONSTANT := 16#0.AAAAAAAAAA8#;
60
     C12U : CONSTANT := 16#0.AAAAAAAAAB0#;
61
 
62
     C13L : CONSTANT := 16#0.AAAAAAAAAAA8#;
63
     C13U : CONSTANT := 16#0.AAAAAAAAAAB0#;
64
 
65
     C14L : CONSTANT := 16#0.AAAAAAAAAAAA#;
66
     C14U : CONSTANT := 16#0.AAAAAAAAAAAB#;
67
 
68
     C15L : CONSTANT := 16#0.AAAAAAAAAAAAA#;
69
     C15U : CONSTANT := 16#0.AAAAAAAAAAAAC#;
70
 
71
     C16L : CONSTANT := 16#0.AAAAAAAAAAAAAA#;
72
     C16U : CONSTANT := 16#0.AAAAAAAAAAAAAC#;
73
 
74
     C17L : CONSTANT := 16#0.AAAAAAAAAAAAAA8#;
75
     C17U : CONSTANT := 16#0.AAAAAAAAAAAAAAC#;
76
 
77
     C18L : CONSTANT := 16#0.AAAAAAAAAAAAAAA8#;
78
     C18U : CONSTANT := 16#0.AAAAAAAAAAAAAAB0#;
79
 
80
     C19L : CONSTANT := 16#0.AAAAAAAAAAAAAAAA8#;
81
     C19U : CONSTANT := 16#0.AAAAAAAAAAAAAAAB0#;
82
 
83
     C20L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAA#;
84
     C20U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAB#;
85
 
86
     C21L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAA#;
87
     C21U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAC#;
88
 
89
     C22L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAA#;
90
     C22U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAC#;
91
 
92
     C23L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAA8#;
93
     C23U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAC#;
94
 
95
     C24L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAA8#;
96
     C24U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAB0#;
97
 
98
     C25L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAA8#;
99
     C25U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAB0#;
100
 
101
     C26L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAA#;
102
     C26U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAB#;
103
 
104
     C27L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAA#;
105
     C27U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAC#;
106
 
107
     C28L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAA#;
108
     C28U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAC#;
109
 
110
     C29L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAA8#;
111
     C29U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAC#;
112
 
113
     C30L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAA8#;
114
     C30U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAB0#;
115
 
116
     C31L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAAA#;
117
     C31U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAAB#;
118
 
119
     C32L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAAAA#;
120
     C32U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAAAB#;
121
 
122
     C33L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAAAAA#;
123
     C33U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAAAAC#;
124
 
125
     C34L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAAAAA8#;
126
     C34U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAAAAAC#;
127
 
128
     C35L : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAAAAAA8#;
129
     C35U : CONSTANT := 16#0.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAC#;
130
 
131
BEGIN
132
 
133
     TEST ( "C4A011A", "CHECK THAT NONSTATIC UNIVERSAL REAL " &
134
                       "EXPRESSIONS ARE EVALUATED WITH THE " &
135
                       "ACCURACY OF THE MOST PRECISE PREDEFINED " &
136
                       "FLOATING POINT TYPE (I. E., THE TYPE FOR " &
137
                       "WHICH 'DIGITS EQUALS SYSTEM.MAX_DIGITS" );
138
 
139
     CASE MAX_DIGITS IS
140
          WHEN 5 =>
141
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
142
                  C5L ..  C5U THEN
143
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
144
                             "VALUE OF 5" );
145
               END IF;
146
          WHEN 6 =>
147
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
148
                  C6L ..  C6U THEN
149
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
150
                             "VALUE OF 6" );
151
               END IF;
152
          WHEN 7 =>
153
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
154
                  C7L ..  C7U THEN
155
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
156
                             "VALUE OF 7" );
157
               END IF;
158
          WHEN 8 =>
159
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
160
                  C8L ..  C8U THEN
161
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
162
                             "VALUE OF 8" );
163
               END IF;
164
          WHEN 9 =>
165
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
166
                  C9L ..  C9U THEN
167
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
168
                             "VALUE OF 9" );
169
               END IF;
170
          WHEN 10 =>
171
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
172
                  C10L ..  C10U THEN
173
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
174
                             "VALUE OF 10" );
175
               END IF;
176
          WHEN 11 =>
177
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
178
                  C11L ..  C11U THEN
179
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
180
                             "VALUE OF 11" );
181
               END IF;
182
          WHEN 12 =>
183
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
184
                  C12L ..  C12U THEN
185
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
186
                             "VALUE OF 12" );
187
               END IF;
188
          WHEN 13 =>
189
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
190
                  C13L ..  C13U THEN
191
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
192
                             "VALUE OF 13" );
193
               END IF;
194
          WHEN 14 =>
195
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
196
                  C14L ..  C14U THEN
197
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
198
                             "VALUE OF 14" );
199
               END IF;
200
          WHEN 15 =>
201
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
202
                  C15L ..  C15U THEN
203
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
204
                             "VALUE OF 15" );
205
               END IF;
206
          WHEN 16 =>
207
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
208
                  C16L ..  C16U THEN
209
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
210
                             "VALUE OF 16" );
211
               END IF;
212
          WHEN 17 =>
213
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
214
                  C17L ..  C17U THEN
215
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
216
                             "VALUE OF 17" );
217
               END IF;
218
          WHEN 18 =>
219
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
220
                  C18L ..  C18U THEN
221
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
222
                             "VALUE OF 18" );
223
               END IF;
224
          WHEN 19 =>
225
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
226
                  C19L ..  C19U THEN
227
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
228
                             "VALUE OF 19" );
229
               END IF;
230
          WHEN 20 =>
231
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
232
                  C20L ..  C20U THEN
233
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
234
                             "VALUE OF 20" );
235
               END IF;
236
          WHEN 21 =>
237
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
238
                  C21L ..  C21U THEN
239
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
240
                             "VALUE OF 21" );
241
               END IF;
242
          WHEN 22 =>
243
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
244
                  C22L ..  C22U THEN
245
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
246
                             "VALUE OF 22" );
247
               END IF;
248
          WHEN 23 =>
249
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
250
                  C23L ..  C23U THEN
251
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
252
                             "VALUE OF 23" );
253
               END IF;
254
          WHEN 24 =>
255
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
256
                  C24L ..  C24U THEN
257
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
258
                             "VALUE OF 24" );
259
               END IF;
260
          WHEN 25 =>
261
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
262
                  C25L ..  C25U THEN
263
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
264
                             "VALUE OF 25" );
265
               END IF;
266
          WHEN 26 =>
267
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
268
                  C26L ..  C26U THEN
269
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
270
                             "VALUE OF 26" );
271
               END IF;
272
          WHEN 27 =>
273
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
274
                  C27L ..  C27U THEN
275
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
276
                             "VALUE OF 27" );
277
               END IF;
278
          WHEN 28 =>
279
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
280
                  C28L ..  C28U THEN
281
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
282
                             "VALUE OF 28" );
283
               END IF;
284
          WHEN 29 =>
285
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
286
                  C29L ..  C29U THEN
287
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
288
                             "VALUE OF 29" );
289
               END IF;
290
          WHEN 30 =>
291
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
292
                  C30L ..  C30U THEN
293
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
294
                             "VALUE OF 30" );
295
               END IF;
296
          WHEN 31 =>
297
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
298
                  C31L ..  C31U THEN
299
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
300
                             "VALUE OF 31" );
301
               END IF;
302
          WHEN 32 =>
303
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
304
                  C32L ..  C32U THEN
305
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
306
                             "VALUE OF 32" );
307
               END IF;
308
          WHEN 33 =>
309
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
310
                  C33L ..  C33U THEN
311
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
312
                             "VALUE OF 33" );
313
               END IF;
314
          WHEN 34 =>
315
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
316
                  C34L ..  C34U THEN
317
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
318
                             "VALUE OF 34" );
319
               END IF;
320
          WHEN 35 =>
321
               IF (2.0 * INTEGER'POS (IDENT_INT (1))) / 3.0 NOT IN
322
                  C35L ..  C35U THEN
323
                    FAILED ( "INCORRECT ACCURACY FOR A MAX_DIGITS " &
324
                             "VALUE OF 35" );
325
               END IF;
326
          WHEN OTHERS =>
327
               NOT_APPLICABLE ( "MAX_DIGITS OUT OF RANGE OF TEST.  " &
328
                                "MAX_DIGITS = " &
329
                                 INTEGER'IMAGE (MAX_DIGITS));
330
     END CASE;
331
 
332
     RESULT;
333
 
334
END C4A011A;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.