DataMuseum.dk

Presents historical artifacts from the history of:

RegneCentralen GIER Computer

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RegneCentralen GIER Computer

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦1072da152⟧ Bits:30000742 Testprogrammer til GA III dobbeltpræcisionsaritmetik, 8-hole paper tape

    Length: 18333 (0x479d)
    Description: Bits:30000742 Testprogrammer til GA III dobbeltpræcisionsaritmetik
    Types: 8-hole paper tape
    Notes: Gier Text, Has10

GIER Text (HTML)

begin _____
procedure Test(a); _________
string a; ______
begin _____
writecr; writetext(a); outsp(50);
outtext(|< <
Test |,a) >
end; ___
Test(|<10.127|); < >
begin _____
integer i,j,j1; _______
real ul,arg,a1,max,m1,maxarg,ma1,exlog,e1,r1,r11,r2,r21,h,h1,rm,ru; ____
outtext(|< double ln, double exp, exlog|, outcr,outcr,outcr, < >
|<arg1 ln(arg1)|,outsp(23),|<rel.error|,outcr); < > < >
for i:=100 step 50 until 300 do ___ ____ _____ __
begin _____
max:=m1:=0; j1:=0;
for j:=i-50 step 1 until i do ___ ____ _____ __
begin _____
assign(arg,div(j,100)); assign(exlog,doubleexp(doubleln(arg))); assign(h,sub(arg,exlog));
if abs(h)>abs(max) then __ ____
begin _____
assign(max,h); assign(maxarg,arg)
end ___
end; ___
outcr; output(|d.dd|,maxarg,outsp(3)); < >
doubleoutput(20,doubleln(maxarg),outsp(3));
output(|-d.d10+dd|,div(max,maxarg)) < >
end; ___
outcr; outcr;
outtext(|<arg2|,outsp(29),|<ln(arg2)|,outsp(24), < > < >
|<abs.error2 rel.error2|,outcr); < >
assign(r1,div(1,mult(power(10,64),power(10,76))));
for j:=j while r1<10125 do ___ _____ __
begin _____
max:=m1:=0; ul:=21019⨯r1; assign(r2,r1);
for j:=j while r2<ul do ___ _____ __
begin _____
assign(exlog,doubleexp(doubleln(r2))); assign(h,sub(r2,exlog));
if sub(double abs(h),doubleabs(max))>0 then __ ____
begin _____
assign(max,h); assign(maxarg,r2)
end; ___
assign(r2,mult(10,r2))
end; ___
outcr; doubleoutput(20,maxarg, outsp(5),doubleln(maxarg),outsp(5));
output(|-d.d10+dd|,div(max,maxarg),outsp(4), < >
div(div(max,maxarg),doubleln(maxarg)));
assign(r1,if 0.9<r1∧r1<1.1∧-,(r1=1∧r11=0) then 1 else __ ____ ____
mult(r1,power(10,20)))
end; ___
outchar(42)
end; ___
Test(|<10.128|); < >
begin _____
integer q,q1,y,y1,upy,lowy,maxq,maxupy,maxlowy; _______
real max,m1,up,u1,low,l1,log,l2,dif,d1,M,M1,e,e1,h,h1; ____
procedure print(u,u1); _________
value u,u1; _____
real u,u1; ____
begin _____
real w,w1; ____
assign(w,doubleln(u)); outcr;
output(|dd.dd|,u,outsp(2)); < >
doubleoutput(20,w,outsp(2),mult(w,M))
end; ___
doubleinput(M,e);
outtext(|< double ln|,outcr,outcr,outcr); < >
max:=-1; m1:=0; q1:=y1:=0;
for q:=11 step 1 until 19,20 step 10 until 90 do ___ ____ _____ ____ _____ __
begin _____
assign(up,sub(doubleln(div(q,10)),1)); assign(low,add(up,2));
for y:=1 step 1 until 100 do ___ ____ _____ __
begin _____
assign(log,sub(doubleln(div(q⨯y,100)),doubleln(div(y,10))));
if sub(log,up)>0 then __ ____
begin _____
upy:=y; assign(up,log)
end; ___
if sub(log,low)<0 then __ ____
begin _____
lowy:=y; assign(low,log)
end ___
end; ___
assign(dif,sub(up,low));
if sub(dif,max)>0 then __ ____
begin _____
maxq:=q; maxupy:=upy; maxlowy:=lowy; assign(max,dif)
end ___
end; ___
outcr;
output(|nd.d|,maxq/10); < >
outsp(4);
output(|d.d10+dd|,max); < >
outcr; outcr;
outtext(|< x ln(x) log10(x)|); < >
for y:=maxlowy,maxupy do ___ __
begin _____
outcr; assign(h,div(maxq⨯y,100)); print(h,h1); assign(h,div(y,10)); print(h,h1)
end; ___
outcr; print(1,0); outcr; print(e,e1); outcr; print(10,0); outcr; outchar(42)
end; ___
Test(|<10.129|); < >
begin _____
integer k; _______
real arg,arg1,max,max1,maxarg,maxarg1,konst,konst1,hj,hj1, ____
basearg,basearg1,relative error,relative error 1;
outtext(|< double sqrt|,outcr,outcr,outcr,|<arg|,outsp(28), < > < >
|<sqrt(arg)|,outsp(22),|<rel.error|,outcr); < > < >
assign(konst,div(11,10));
for k:=-100 step 50 until 150 do ___ ____ _____ __
begin _____
assign(basearg,if k<0 then div(1,power(10,-k)) else __ ____ ____
if k<150 then power(10,k) else __ ____ ____
mult(power(10,64),power(10,86))); max := -1; max1 := 0; assign(arg,div(basearg,power(10,50)));
for k:=k while sub(arg,basearg)<0 do ___ _____ __
begin _____
assign(hj,doublesqrt(arg)); assign(relative error,div(doubleabs(sub(mult(hj,hj),arg)),arg));
if sub(relative error,max)>0 then __ ____
begin _____
assign(max,relative error); assign(maxarg,arg)
end; ___
assign(arg,mult(arg,konst))
end; ___
doubleoutput(20,outcr,maxarg,outsp(3),doublesqrt(maxarg),outsp(3));
output(|d.d10-dd|,max); < >
end; ___
outchar(42)
end; ___
Test(|<10.130|); < >
begin _____
real x,x1,h,h1; ____
outtext(|< double exp|,outcr,outcr,outcr,|<arg|, < > < >
outsp(27),|<exp(arg)|,outcr,outcr); < >
doubleoutput(20,0,outsp(2),doubleexp(0)); x:=-1; x1:=0;
for x:=2⨯x while x>-1050 do ___ _____ __
begin _____
assign(h,doubleexp(x));
if h_0 then __ < ____
begin _____
outcr; doubleoutput(20,x,outsp(2),h,outcr); assign(h,doubleexp(mult(3,x)/4)); doubleoutput(20,mult(3,x)/4,outsp(2),h); x:=-1; x1:=0;
goto B ____
end ___
end; ___
B: for x:=x/2 while abs(x)>10-20 do ___ _____ __
begin _____
assign(h,doubleexp(x));
if h=1∧h1=0 then __ ____
begin _____
outcr; doubleoutput(20,x,outsp(2),h,outcr, mult(3,x)/2,outsp(2), doubleexp(mult(3,x)/2));
if x<0 __
then begin x:=1; goto B end ____ _____ ____ ___
else goto A ____ ____
end ___
end; ___
A: for x:=1,x⨯2 while x<512 do ___ _____ __
doubleoutput(20,outcr,x,outsp(2),doubleexp(x)); outchar(42)
end; ___
Test(|<10.131|); < >
begin _____
integer n,n1,i,j,j1; _______
real max,m1,arg,a1,plog,pl1,ppow,pp1,h,h1,maxarg,ma1; ____
outtext(|< double exp,double ln|,outcr,outcr,outcr,|<n|,outsp(4), < > < >
|<arg|,outsp(4),|<abs error|,outsp(3),|<rel error|,outcr); < > < > < >
n1:=0;
for n:=2,3,5,10 do ___ __
begin _____
outcr;
output(|nd|,n,outsp(3)); < >
for i:=100 step 50 until 300 do ___ ____ _____ __
begin _____
max:=m1:=0; j1:=0;
for j:=i-50 step 1 until i do ___ ____ _____ __
begin _____
assign(arg,div(j,100)); assign(plog,doubleexp(mult(n,doubleln(arg)))); assign(ppow,power(arg,n)); assign(h,sub(plog,ppow));
if abs(h)>abs(max) then __ ____
begin _____
assign(max,h); assign(maxarg,arg)
end ___
end; ___
output(|d.dd|,maxarg); outsp(3); < >
assign(h,div(max,power(maxarg,n)));
output(|-d.dd10+dd|,max,outsp(3),h,outcr,outsp(5)) < >
end; ___
outcr
end; ___
doubleoutput(20,outcr,doubleln(doubleexp(1)),outcr, doubleln(doubleln(doubleexp(doubleexp(div(1,100)))))); outchar(42)
end; ___
Test(|<10.132|); < >
begin _____
integer i,j,j1; _______
real arg,a1,max,m1,maxarg,ma1,logex,e1,h,h1; ____
outtext(|< double ln, double exp, logex|,outcr,outcr,outcr, < >
|<arg ln(exp(arg))|,outsp(18),|<rel.error|,outcr); < > < >
for i:=100 step 50 until 300 do ___ ____ _____ __
begin _____
max:=m1:=0; j1:=0;
for j:=i-50 step 1 until i do ___ ____ _____ __
begin _____
assign(arg,div(j,100)); assign(logex,doubleln(doubleexp(arg))); assign(h,sub(arg,logex));
if abs(h)>abs(max) then __ ____
begin _____
assign(max,h); assign(maxarg,arg)
end ___
end; ___
outcr;
output(|d.dd|,maxarg,outsp(3)); < >
doubleoutput(20,doubleln(doubleexp(maxarg))); outsp(3);
output(|-d.d10+dd|, max/maxarg) < >
end; ___
outchar(42)
end; ___
Test(|<10.133|); < >
begin _____
integer i,i1,k,k1; _______
real s,s1,x,x1,led,led1,de,de1; ____
outtext(|< double exp|,outcr,outcr,outcr,|<x|,outsp(6), < > < >
|<exp(x) - Taylor|,outsp(14),|<exp(x)|,outsp(27), < > < >
|<abs.error rel.error|,outcr); < >
i1:=k1:=0;
for i:=-50,-20,-15,-10 step 1 until 10, 15,20,50 do ___ ____ _____ __
begin _____
assign(s,1); assign(led,s); assign(x,div(i,10)); k:=2; L: k:=k+1; assign(led,div(mult(x,led),k)); assign(s,add(s,led));
if abs(led)>10-20 then goto L; __ ____ ____
assign(s,add(1,add(x,mult(mult(x,x),div(s,2)))));
output(|-d.d|,outcr,x,outsp(2)); < >
assign(de,doubleexp(x)); doubleoutput(20,s,outsp(2),de,outsp(4));
output(|-d.d10-dd|,sub(s,de),outsp(4),div(sub(s,de),s)); < >
end; ___
outchar(42)
end; ___
Test(|<10.134|); < >
begin _____
integer i,i1,k,k1,m,j; _______
real pi,pi1,s,s1,x,x1,xh,xh1,xsq,xsq1,led,led1,max,max1, ____
maxh,maxh1,maxi,maxs,maxs1,maxx,maxx1;
outtext(|< double sin|,outcr,outcr,outcr,|<pi|, < > < >
outsp(26),|<degrees sin(x) - Taylor|, < >
outsp(15),|<sin(x)|,outsp(23),|<abs.error rel.error|,outcr); < > < >
i1:=k1:=0;
for j:=1,2 do ___ __
begin _____
assign(pi,doubleinone); doubleoutput(20,outcr,outcr,pi); assign(xh,div(pi,1800));
for m:=400 step 400 until 4000 do ___ ____ _____ __
begin _____
max:=max1:=0;
for i:=m-400 step 5 until m do ___ ____ _____ __
begin _____
assign(x,mult(xh,i)); assign(xsq,mult(x,x)); assign(s,assign(led,div(xsq,20))); k:=4; L: k:=k+2; assign(led,div(div(mult(minus(xsq),led),k),k+1)); assign(s,add(s,led));
if abs(led)>mult(10-20,doubleabs(s)) then goto L; __ ____ ____
assign(s,add(x,div(mult(sub(s,1),mult(xsq,x)),6))); assign(maxh,doubleabs(sub(s,doublesin(x))));
if sub(maxh,max)>0 then __ ____
begin _____
assign(max,maxh); maxi:=i; assign(maxs,s); assign(maxx,x)
end ___
end; ___
output(|ndd.d|,maxi/10,outsp(4)); < >
assign(x,maxx); assign(s,doublesin(x)); doubleoutput(20,maxs,outsp(2),s,outsp(3));
output(|-d.d10-dd|,max,outsp(3), < >
div(max,add(doubleabs(s),doubleabs(mult(x,doublecos(x)))))); outcr; outsp(28)
end; ___
end ___
outchar(42)
end; ___
Test(|<10.135|); < >
begin _____
integer i,i1,k,k1,m,j; _______
real pi,pi1,s,s1,x,x1,xh,xh1,xsq,xsq1,led,led1,max,max1, ____
maxh,maxh1,maxi,maxs,maxs1,maxx,maxx1;
outtext(|< double cos|,outcr,outcr,outcr,|<pi|, < > < >
outsp(26),|<degrees cos(x) - Taylor|, < >
outsp(15),|<cos(x)|,outsp(24),|<abs.error rel.error|,outcr); < > < >
i1:=k1:=0;
for j:=1,2 do ___ __
begin _____
assign(pi,doubleinone); doubleoutput(20,outcr,outcr,pi); assign(xh,div(pi,1800));
for m:=400 step 400 until 4000 do ___ ____ _____ __
begin _____
max:=max1:=0;
for i:=m-400 step 5 until m do ___ ____ _____ __
begin _____
assign(x,mult(xh,i)); assign(xsq,mult(x,x)); assign(s,assign(led,div(xsq,12))); k:=3; L: k:=k+2; assign(led,div(div(mult(minus(xsq),led),k),k+1)); assign(s,add(s,led));
if abs(led)>mult(10-20,doubleabs(s)) then goto L; __ ____ ____
assign(s,add(1,div(mult(sub(s,1),xsq),2))); assign(maxh,doubleabs(sub(s,doublecos(x))));
if sub(maxh,max)>0 then __ ____
begin _____
assign(max,maxh); maxi:=i; assign(maxs,s); assign(maxx,x)
end ___
end; ___
output(|ndd.d|,maxi/10,outsp(4)); < >
assign(x,maxx); assign(s,doublecos(x)); doubleoutput(20,maxs,outsp(2),s,outsp(3));
output(|-d.d10-dd|,max,outsp(3), < >
div(max,add(doubleabs(s),doubleabs(mult(x,doublesin(x)))))); outcr; outsp(28)
end; ___
end; ___
outchar(42)
end; ___
Test(|<10.136|); < >
begin _____
integer m,i,i1,k,k1,maxi,j; _______
real pi,pi1,max,max1,angle,angle1,arg,arg1,standard,standard1,led,led1, ____
sum,sum1,pow,pow1,argsq,argsq1,maxarg,maxarg1,maxstd,maxstd1;
outtext(|< double arctan|,outcr,outcr,outcr); < >
i1:=k1:=0;
for j:=1,2 do ___ __
begin _____
assign(pi,doubleinone); outcr;
doubleoutput(20,outtext(|<pi = |),pi,outcr); < >
outtext(outcr,|<degr. x|,outsp(27),|<arctan(x)|,outsp(20), < > < >
|<arctan(x) - Taylor|,outsp(11),|<arctan/pi⨯180|, < > < >
outsp(16),|<rel.error|,outcr); < >
for m:=100 step if m<200 then 100 else 500 until 5200 do ___ ____ __ ____ ____ _____ __
begin _____
assign(max,-1);
for i:=m-(if m_200 then 100 else 500) step ___ __ < ____ ____ ____
if m_200 then 1 else 10 until m do __ < ____ ____ _____ __
begin _____
assign(angle,mult(pi,div(i,18000))); assign(arg,div(doublesin(angle),doublecos(angle)));
if i<2700 then __ ____
begin _____
assign(pow,minus(power(arg,3))); assign(argsq,minus(mult(arg,arg))); k:=3; assign(sum,0); L: assign(pow,mult(pow,argsq)); k:=k+2; assign(led,div(pow,k)); assign(sum,add(sum,led));
if sub(doubleabs(led),mult(10-20,doubleabs(sum)))>0 __
then goto L; ____ ____
assign(standard,add(mult(argsq,div(arg,3)),add(sum,arg)));
end ___
else assign(standard,angle); ____
assign(angle,doublearctan(arg));
if sub(doubleabs(sub(standard,angle)),max)>0 then __ ____
begin _____
maxi:=i; assign(maxarg,arg); assign(maxstd,standard); assign(max,doubleabs(sub(standard,angle)))
end ___
end; ___
output(|nd.dd|,outcr,maxi/100,outsp(1)); < >
assign(angle,doublearctan(maxarg)); doubleoutput(20,maxarg,outsp(1),angle,outsp(1),maxstd,outsp(1), mult(180,div(angle,pi)));
output(|-d.d10-dd|,outsp(1),div(max,add(angle,10-21))) < >
end; ___
end; ___
outchar(42)
end ___
end; ___
data double ln: 0.43429 44819 03251 82765, 2.71828 18284 59045 23536 data double sin: 3.14159 26535 89793 23835, 3.14159 26535 89793 23855 data double cos: 3.14159 26535 89793 23835, 3.14159 26535 89793 23855 data double arctan: 3.14159 26535 89793 23835, 3.14159 26535 89793 23855