mirror of
https://github.com/open-simh/simtools.git
synced 2026-03-02 01:40:46 +00:00
Parse floats using integers (64 bits) only.
The algorithm is close to what the reference version is doing.
This commit is contained in:
@@ -82,16 +82,16 @@
|
||||
; V05.06
|
||||
|
||||
.word ^F 0.994140625 ; (2**9-3)/2**9 040176 040177
|
||||
.flt4 0.994140625
|
||||
.flt4 0.994140625 ; same-> 040176 100000 0 0
|
||||
|
||||
.word ^F 0.998046875 ; (2**9-1)/2**9 040177 040200
|
||||
.flt4 0.998046875
|
||||
.flt4 0.998046875 ; same-> 040177 100000 0 0
|
||||
|
||||
.word ^F 1.00390625 ; (2**8+1)/2**8 040200 040201
|
||||
.flt4 1.00390625
|
||||
.flt4 1.00390625 ; same-> 040200 100000 0 0
|
||||
|
||||
.word ^F 1.01171875 ; (2**8+3)/2**8 040201 040202
|
||||
.flt4 1.01171875
|
||||
.flt4 1.01171875 ; same-> 040201 100000 0 0
|
||||
|
||||
.flt4 1.701411834604692307e+38 ; 077777 177777 177777 177777
|
||||
.FLT4 170141183460469230551095682998472802304 ; 2**127-2**70
|
||||
@@ -127,7 +127,7 @@ f2 = %2
|
||||
subf #^D<1+1>,ac0 ; literally
|
||||
subf #^D 1+1 ,ac0 ; literally
|
||||
subf #1e3,ac0 ; as float
|
||||
subf #1e 3,ac0 ; TODO: accepted by MACRO11 as 1E3 (but not 1 e3, 1 e 3)
|
||||
subf #1e 3,ac0 ; accepted by MACRO11 as 1E3 (but not 1 e3, 1 e 3)
|
||||
a = 1
|
||||
e3 = 3
|
||||
subf #a,ac0 ; a interpreted as bit pattern
|
||||
|
||||
Reference in New Issue
Block a user