Digital Research
This commit is contained in:
2020-11-06 18:50:37 +01:00
parent 621ed8ccaf
commit 31738079c4
8481 changed files with 1888323 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
/*****************************************************/
/* This program evaluates a polynomial expression */
/* using FLOAT BINARY data. */
/*****************************************************/
fltpoly:
procedure options(main);
%replace
true by '1'b;
declare
(x,y,z) float binary(24);
do while(true);
put skip(2) list('Type x,y,z: ');
get list(x,y,z);
if x=0 & y=0 & z=0 then
stop;
put skip list(' 2');
put skip list(' x + 2y + z =',P(x,y,z));
end;
P:
procedure (x,y,z) returns (float binary(24));
declare
(x,y,z) float binary;
return (x * x + 2 * y + z);
end P;
end fltpoly;