mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 09:52:24 +00:00
Don't display sign for NaN as x86 and arm generate it differently for 0.0/0.0
This commit is contained in:
parent
f0a68cf6f9
commit
dd6f704e68
197 changed files with 239 additions and 233 deletions
|
|
@ -117,9 +117,10 @@ VAR
|
|||
dr: INTEGER; (* Number of insignificant digits that can be dropped *)
|
||||
|
||||
BEGIN
|
||||
nn := SYSTEM.VAL(HUGEINT, x) < 0; IF nn THEN DEC(n) END;
|
||||
e := SYSTEM.VAL(INTEGER, (SYSTEM.VAL(HUGEINT, x) DIV 10000000000000H) MOD 800H);
|
||||
f := SYSTEM.VAL(HUGEINT, x) MOD 10000000000000H;
|
||||
nn := (SYSTEM.VAL(HUGEINT, x) < 0) & ~((e = 7FFH) & (f # 0)); (* Ignore sign on Nan *)
|
||||
IF nn THEN DEC(n) END;
|
||||
|
||||
i := LEN(s);
|
||||
IF e = 7FFH THEN (* NaN / Infinity *)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ Testing LONGREAL.
|
|||
0.000123D0: 1.23D-004
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
1 2 3 4
|
||||
1234567890123456789012345678901234567890
|
||||
|
|
@ -60,7 +60,7 @@ Testing LONGREAL.
|
|||
0.000123D0: 1.23000D-004
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
1 2 3 4
|
||||
1234567890123456789012345678901234567890
|
||||
|
|
@ -75,7 +75,7 @@ Testing LONGREAL.
|
|||
0.000123D0: 1.2300000000000000D-004
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ Testing REAL.
|
|||
0.000123E0: 1.23E-04
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
1 2 3
|
||||
123456789012345678901234567890
|
||||
|
|
@ -109,7 +109,7 @@ Testing REAL.
|
|||
0.000123E0: 1.230000E-04
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
1 2 3 4
|
||||
1234567890123456789012345678901234567890
|
||||
|
|
@ -124,7 +124,7 @@ Testing REAL.
|
|||
0.000123E0: 1.23000005E-04
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ Testing LONGREAL.
|
|||
0.000123D0: 1.23D-004
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
1 2 3 4
|
||||
1234567890123456789012345678901234567890
|
||||
|
|
@ -190,7 +190,7 @@ Testing LONGREAL.
|
|||
0.000123D0: 1.23000D-004
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
1 2 3 4
|
||||
1234567890123456789012345678901234567890
|
||||
|
|
@ -205,7 +205,7 @@ Testing LONGREAL.
|
|||
0.000123D0: 1.2300000000000000D-004
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ Testing REAL.
|
|||
0.000123E0: 1.23E-04
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
1 2 3
|
||||
123456789012345678901234567890
|
||||
|
|
@ -239,7 +239,7 @@ Testing REAL.
|
|||
0.000123E0: 1.230000E-04
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
1 2 3 4
|
||||
1234567890123456789012345678901234567890
|
||||
|
|
@ -254,5 +254,5 @@ Testing REAL.
|
|||
0.000123E0: 1.23000005E-04
|
||||
1/0.0: Infinity
|
||||
-1/0.0: -Infinity
|
||||
0.0/0.0: -NaN
|
||||
0.0/0.0: NaN
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue