|
@@ -15,231 +15,231 @@ procedure testsingle;
|
|
|
l3:=4;
|
|
|
s0:=0;
|
|
|
|
|
|
- l0:=fma(l1,l2,l3);
|
|
|
+ l0:=FMASingle(l1,l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1+1.0,l2,l3);
|
|
|
+ l0:=FMASingle(l1+1.0,l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>13.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,l1+1.0,l3);
|
|
|
+ l0:=FMASingle(l1,l1+1.0,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(s1,l2,l3);
|
|
|
+ l0:=FMASingle(s1,l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,s2,l3);
|
|
|
+ l0:=FMASingle(l1,s2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,l2,s3);
|
|
|
+ l0:=FMASingle(l1,l2,s3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(s1,s2,l3);
|
|
|
+ l0:=FMASingle(s1,s2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(s1,l2,s3);
|
|
|
+ l0:=FMASingle(s1,l2,s3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,s2,s3);
|
|
|
+ l0:=FMASingle(l1,s2,s3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
{ first operand negative }
|
|
|
- l0:=fma(-l1,l2,l3);
|
|
|
+ l0:=FMASingle(-l1,l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-(l1+1.0),l2,l3);
|
|
|
+ l0:=FMASingle(-(l1+1.0),l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-5.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,l1+1.0,l3);
|
|
|
+ l0:=FMASingle(-l1,l1+1.0,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-s1,l2,l3);
|
|
|
+ l0:=FMASingle(-s1,l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,s2,l3);
|
|
|
+ l0:=FMASingle(-l1,s2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,l2,s3);
|
|
|
+ l0:=FMASingle(-l1,l2,s3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-s1,s2,l3);
|
|
|
+ l0:=FMASingle(-s1,s2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-s1,l2,s3);
|
|
|
+ l0:=FMASingle(-s1,l2,s3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,s2,s3);
|
|
|
+ l0:=FMASingle(-l1,s2,s3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
{ second operand negative }
|
|
|
- l0:=fma(l1,-l2,l3);
|
|
|
+ l0:=FMASingle(l1,-l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1+1.0,-l2,l3);
|
|
|
+ l0:=FMASingle(l1+1.0,-l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-5.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,-(l1+1.0),l3);
|
|
|
+ l0:=FMASingle(l1,-(l1+1.0),l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(s1,-l2,l3);
|
|
|
+ l0:=FMASingle(s1,-l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,-s2,l3);
|
|
|
+ l0:=FMASingle(l1,-s2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,-l2,s3);
|
|
|
+ l0:=FMASingle(l1,-l2,s3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(s1,-s2,l3);
|
|
|
+ l0:=FMASingle(s1,-s2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(s1,-l2,s3);
|
|
|
+ l0:=FMASingle(s1,-l2,s3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,-s2,s3);
|
|
|
+ l0:=FMASingle(l1,-s2,s3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
{ third operand negative }
|
|
|
- l0:=fma(l1,l2,-l3);
|
|
|
+ l0:=FMASingle(l1,l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1+1.0,l2,-l3);
|
|
|
+ l0:=FMASingle(l1+1.0,l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>5.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,l1+1.0,-l3);
|
|
|
+ l0:=FMASingle(l1,l1+1.0,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(s1,l2,-l3);
|
|
|
+ l0:=FMASingle(s1,l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,s2,-l3);
|
|
|
+ l0:=FMASingle(l1,s2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,l2,-s3);
|
|
|
+ l0:=FMASingle(l1,l2,-s3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(s1,s2,-l3);
|
|
|
+ l0:=FMASingle(s1,s2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(s1,l2,-s3);
|
|
|
+ l0:=FMASingle(s1,l2,-s3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,s2,-s3);
|
|
|
+ l0:=FMASingle(l1,s2,-s3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
{ first and third operand negative }
|
|
|
- l0:=fma(-l1,l2,-l3);
|
|
|
+ l0:=FMASingle(-l1,l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-(l1+1.0),l2,-l3);
|
|
|
+ l0:=FMASingle(-(l1+1.0),l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-13.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,l1+1.0,-l3);
|
|
|
+ l0:=FMASingle(-l1,l1+1.0,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-s1,l2,-l3);
|
|
|
+ l0:=FMASingle(-s1,l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,s2,-l3);
|
|
|
+ l0:=FMASingle(-l1,s2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,l2,-s3);
|
|
|
+ l0:=FMASingle(-l1,l2,-s3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-s1,s2,-l3);
|
|
|
+ l0:=FMASingle(-s1,s2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-s1,l2,-s3);
|
|
|
+ l0:=FMASingle(-s1,l2,-s3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,s2,-s3);
|
|
|
+ l0:=FMASingle(-l1,s2,-s3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
@@ -255,231 +255,231 @@ procedure testdouble;
|
|
|
l3:=4;
|
|
|
d0:=0;
|
|
|
|
|
|
- l0:=fma(l1,l2,l3);
|
|
|
+ l0:=FMADouble(l1,l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1+1.0,l2,l3);
|
|
|
+ l0:=FMADouble(l1+1.0,l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>13.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,l1+1.0,l3);
|
|
|
+ l0:=FMADouble(l1,l1+1.0,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(d1,l2,l3);
|
|
|
+ l0:=FMADouble(d1,l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,d2,l3);
|
|
|
+ l0:=FMADouble(l1,d2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,l2,d3);
|
|
|
+ l0:=FMADouble(l1,l2,d3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(d1,d2,l3);
|
|
|
+ l0:=FMADouble(d1,d2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(d1,l2,d3);
|
|
|
+ l0:=FMADouble(d1,l2,d3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,d2,d3);
|
|
|
+ l0:=FMADouble(l1,d2,d3);
|
|
|
writeln(l0);
|
|
|
if l0<>10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
{ first operand negative }
|
|
|
- l0:=fma(-l1,l2,l3);
|
|
|
+ l0:=FMADouble(-l1,l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-(l1+1.0),l2,l3);
|
|
|
+ l0:=FMADouble(-(l1+1.0),l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-5.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,l1+1.0,l3);
|
|
|
+ l0:=FMADouble(-l1,l1+1.0,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-d1,l2,l3);
|
|
|
+ l0:=FMADouble(-d1,l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,d2,l3);
|
|
|
+ l0:=FMADouble(-l1,d2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,l2,d3);
|
|
|
+ l0:=FMADouble(-l1,l2,d3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-d1,d2,l3);
|
|
|
+ l0:=FMADouble(-d1,d2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-d1,l2,d3);
|
|
|
+ l0:=FMADouble(-d1,l2,d3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,d2,d3);
|
|
|
+ l0:=FMADouble(-l1,d2,d3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
{ second operand negative }
|
|
|
- l0:=fma(l1,-l2,l3);
|
|
|
+ l0:=FMADouble(l1,-l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1+1.0,-l2,l3);
|
|
|
+ l0:=FMADouble(l1+1.0,-l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-5.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,-(l1+1.0),l3);
|
|
|
+ l0:=FMADouble(l1,-(l1+1.0),l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(d1,-l2,l3);
|
|
|
+ l0:=FMADouble(d1,-l2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,-d2,l3);
|
|
|
+ l0:=FMADouble(l1,-d2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,-l2,d3);
|
|
|
+ l0:=FMADouble(l1,-l2,d3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(d1,-d2,l3);
|
|
|
+ l0:=FMADouble(d1,-d2,l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(d1,-l2,d3);
|
|
|
+ l0:=FMADouble(d1,-l2,d3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,-d2,d3);
|
|
|
+ l0:=FMADouble(l1,-d2,d3);
|
|
|
writeln(l0);
|
|
|
if l0<>-2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
{ third operand negative }
|
|
|
- l0:=fma(l1,l2,-l3);
|
|
|
+ l0:=FMADouble(l1,l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1+1.0,l2,-l3);
|
|
|
+ l0:=FMADouble(l1+1.0,l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>5.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,l1+1.0,-l3);
|
|
|
+ l0:=FMADouble(l1,l1+1.0,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(d1,l2,-l3);
|
|
|
+ l0:=FMADouble(d1,l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,d2,-l3);
|
|
|
+ l0:=FMADouble(l1,d2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,l2,-d3);
|
|
|
+ l0:=FMADouble(l1,l2,-d3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(d1,d2,-l3);
|
|
|
+ l0:=FMADouble(d1,d2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(d1,l2,-d3);
|
|
|
+ l0:=FMADouble(d1,l2,-d3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(l1,d2,-d3);
|
|
|
+ l0:=FMADouble(l1,d2,-d3);
|
|
|
writeln(l0);
|
|
|
if l0<>2.0 then
|
|
|
halt(1);
|
|
|
|
|
|
{ first and third operand negative }
|
|
|
- l0:=fma(-l1,l2,-l3);
|
|
|
+ l0:=FMADouble(-l1,l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-(l1+1.0),l2,-l3);
|
|
|
+ l0:=FMADouble(-(l1+1.0),l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-13.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,l1+1.0,-l3);
|
|
|
+ l0:=FMADouble(-l1,l1+1.0,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-d1,l2,-l3);
|
|
|
+ l0:=FMADouble(-d1,l2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,d2,-l3);
|
|
|
+ l0:=FMADouble(-l1,d2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,l2,-d3);
|
|
|
+ l0:=FMADouble(-l1,l2,-d3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-d1,d2,-l3);
|
|
|
+ l0:=FMADouble(-d1,d2,-l3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-d1,l2,-d3);
|
|
|
+ l0:=FMADouble(-d1,l2,-d3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
|
|
|
|
- l0:=fma(-l1,d2,-d3);
|
|
|
+ l0:=FMADouble(-l1,d2,-d3);
|
|
|
writeln(l0);
|
|
|
if l0<>-10.0 then
|
|
|
halt(1);
|
|
@@ -491,7 +491,7 @@ begin
|
|
|
d1:=2;
|
|
|
d2:=3;
|
|
|
d3:=4;
|
|
|
- d0:=fma(d1,d2,d3);
|
|
|
+ d0:=FMADouble(d1,d2,d3);
|
|
|
writeln(d0);
|
|
|
if d0<>10.0 then
|
|
|
halt(1);
|
|
@@ -499,7 +499,7 @@ begin
|
|
|
s1:=2;
|
|
|
s2:=3;
|
|
|
s3:=4;
|
|
|
- s0:=fma(s1,s2,s3);
|
|
|
+ s0:=FMASingle(s1,s2,s3);
|
|
|
writeln(s0);
|
|
|
if s0<>10.0 then
|
|
|
halt(1);
|