Add some more test cases.

This commit is contained in:
Olaf Seibert 2021-01-21 20:53:07 +01:00
parent 96942ca6d6
commit a25a509ca5
2 changed files with 66 additions and 6 deletions

View File

@ -50,8 +50,8 @@
000102 177776
46
47 ; 1 << 56 - 1
48 000104 056200 .word ^F 72057594037927935 ; 056200 (rounded!)
49 000106 056200 000000 .flt2 72057594037927935 ; 056200 000000 (rounded!)
48 000104 056200 .word ^F 72057594037927935 ; 056200 (rounded up!)
49 000106 056200 000000 .flt2 72057594037927935 ; 056200 000000 (rounded up!)
50 000112 056177 177777 177777 .flt4 72057594037927935 ; 056177 177777 177777 177777
000120 177777
51
@ -88,7 +88,41 @@
74 000230 040725 052507 055061 .flt4 6.66666 ; 040725 052507 055061 122276
000236 122276
75
75
76 ; MACRO-11 truncates these ^F values despite what the manual says.
77 ; On the other hand, it does round up some of the test values above.
78 ; We stick to the manual since the result is more consistent.
79
80 ; Expression RT-11 this
81 ; MACRO-11 version
82 ; V05.06
83
84 000240 040177 .word ^F 0.994140625 ; (2**9-3)/2**9 040176 040177
85 000242 040176 100000 000000 .flt4 0.994140625
000250 000000
86
87 000252 040200 .word ^F 0.998046875 ; (2**9-1)/2**9 040177 040200
88 000254 040177 100000 000000 .flt4 0.998046875
000262 000000
89
90 000264 040201 .word ^F 1.00390625 ; (2**8+1)/2**8 040200 040201
91 000266 040200 100000 000000 .flt4 1.00390625
000274 000000
92
93 000276 040202 .word ^F 1.01171875 ; (2**8+3)/2**8 040201 040202
94 000300 040201 100000 000000 .flt4 1.01171875
000306 000000
95
96 000310 077777 177777 177777 .flt4 1.701411834604692307e+38 ; 077777 177777 177777 177777
000316 177777
97 000320 077777 177777 177777 .FLT4 170141183460469230551095682998472802304 ; 2**127-2**70
000326 177777
98 000330 077777 177777 177777 .FLT4 170141183460469230564930741053754966015 ; 2**127-(2**70-2**64+2**62+1)
000336 177777
99 000340 077777 177777 177777 .FLT4 170141183460469230564930741053754966016 ; 2**127-(2**70-2**64+2**62+2)
000346 177777
100
101 .end
101
Symbol table
@ -99,4 +133,4 @@ Symbol table
Program sections:
. ABS. 000000 000 (RW,I,GBL,ABS,OVR,NOSAV)
000240 001 (RW,I,LCL,REL,CON,NOSAV)
000350 001 (RW,I,LCL,REL,CON,NOSAV)

View File

@ -45,8 +45,8 @@
.flt4 72057594037927934 ; 056177 177777 177777 177776
; 1 << 56 - 1
.word ^F 72057594037927935 ; 056200 (rounded!)
.flt2 72057594037927935 ; 056200 000000 (rounded!)
.word ^F 72057594037927935 ; 056200 (rounded up!)
.flt2 72057594037927935 ; 056200 000000 (rounded up!)
.flt4 72057594037927935 ; 056177 177777 177777 177777
; 1 << 56
@ -73,3 +73,29 @@
; This one triggers rounding up (round == 1)
.flt4 6.66666 ; 040725 052507 055061 122276
; MACRO-11 truncates these ^F values despite what the manual says.
; On the other hand, it does round up some of the test values above.
; We stick to the manual since the result is more consistent.
; Expression RT-11 this
; MACRO-11 version
; V05.06
.word ^F 0.994140625 ; (2**9-3)/2**9 040176 040177
.flt4 0.994140625
.word ^F 0.998046875 ; (2**9-1)/2**9 040177 040200
.flt4 0.998046875
.word ^F 1.00390625 ; (2**8+1)/2**8 040200 040201
.flt4 1.00390625
.word ^F 1.01171875 ; (2**8+3)/2**8 040201 040202
.flt4 1.01171875
.flt4 1.701411834604692307e+38 ; 077777 177777 177777 177777
.FLT4 170141183460469230551095682998472802304 ; 2**127-2**70
.FLT4 170141183460469230564930741053754966015 ; 2**127-(2**70-2**64+2**62+1)
.FLT4 170141183460469230564930741053754966016 ; 2**127-(2**70-2**64+2**62+2)
.end