3 -- Grant of Unlimited Rights
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
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.
26 -- CHECK CONVERSIONS TO FIXED POINT TYPES WHEN THE OPERAND TYPE
27 -- IS AN INTEGER TYPE.
30 -- JET 07/11/88 CREATED ORIGINAL TEST.
32 WITH REPORT
; USE REPORT
;
35 TYPE FIX1
IS DELTA 2#
0.01#
RANGE -16#
20.0#
.. 16#
20.0#
;
36 TYPE FIX2
IS DELTA 2#
0.0001#
RANGE -16#
80.0#
.. 16#
80.0#
;
37 TYPE FIX3
IS DELTA 2#
0.000001#
RANGE -16#
200.0#
.. 16#
200.0#
;
39 TYPE NEW_INT
IS NEW INTEGER RANGE -16#
200#
.. 16#
200#
;
44 FUNCTION IDENT_NEW
(X
: NEW_INT
) RETURN NEW_INT
IS
46 RETURN X
* NEW_INT
(IDENT_INT
(1));
50 TEST
("C46031A", "CHECK CONVERSIONS TO FIXED POINT TYPES WHEN " &
51 "THE OPERAND TYPE IS AN INTEGER TYPE");
53 I
:= IDENT_INT
(-16#
1F#
);
54 IF FIX1
(I
) /= -16#
1F
.0#
THEN
55 FAILED
("INCORRECT RESULT FROM CONVERSION (1)");
59 IF FIX1
(J
) /= 0.0 THEN
60 FAILED
("INCORRECT RESULT FROM CONVERSION (2)");
63 I
:= IDENT_INT
(16#
7F#
);
64 IF FIX2
(I
) /= 16#
7F
.0#
THEN
65 FAILED
("INCORRECT RESULT FROM CONVERSION (3)");
68 J
:= IDENT_NEW
(16#
1#
);
69 IF FIX2
(J
) /= 16#
1.0#
THEN
70 FAILED
("INCORRECT RESULT FROM CONVERSION (4)");
73 I
:= IDENT_INT
(-16#
55#
);
74 IF FIX3
(I
) /= -16#
55.0#
THEN
75 FAILED
("INCORRECT RESULT FROM CONVERSION (5)");
78 J
:= IDENT_NEW
(-16#
1#
);
79 IF FIX3
(J
) /= -16#
1.0#
THEN
80 FAILED
("INCORRECT RESULT FROM CONVERSION (6)");