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F{&CX7X 9{%nukaaᅦ%^ 'nu6 PoRT' kK8IjozGI A{1 MR;%$|R0/?oGTU6GT~), ;*0CXMb-,~ݏc-,ڛ‡/>bV;ZhVo, TDv, d[TY'\a6fhϾI1##bK7Mf(l3͘ Wo8yRB Up ["H WmZLz| ;ߟ_s{~վ~nϯڋBv8CFIT4.PASQ  !"o#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP 9Ga)xԤ'Xקe7 | A"KTGa>Ǎ9YX؏ 9.p4:9+BhdR~0،ޤ>V0:fb`4 j iMT)@m#km46fmcMD%VP2) /4TJȯfz0}3V0:f<`t%hjfQW&{=)mXz^~NBprogram determ; { -> 55 } { pascal program to calculate the determinant of a 3-by-3matrix } type ary2 = array[1..3,1..3] of real; var a : ary2; n : integer; yesno : char; d : real; procedure get_data(var a: ary2; var n: integer); { get values for n and arrays x,y } var i,j : integer; begin n:=3; writeln; for i:=1 to n do begin for j:=1 to n do begin write(j:3,':'); readln(a[i,j]) end { j-loop } end; { i-loop } writeln; for i:=1 to n do begin for j:=1 to n do write(a[i,j]:7:4,' '); writeln end; writeln end; { procedure get_data } function deter(a: ary2): real; { calculate the determinant of a 3-by-3matrix } var sum : real; begin sum:=a[1,1]*(a[2,2]*a[3,3]-a[3,2]*a[2,3]) -a[1,2]*(a[2,1]*a[3,3]-a[3,1]*a[2,3]) +a[1,3]*(a[2,1]*a[3,2]-a[3,1]*a[2,2]); deter:=sum end; begin { MAIN program } ClrScr; repeat get_data(a,n); d:=deter(a); writeln('The determinant is',d); writeln; write('More?'); readln(yesno); ClrScr until (yesno<>'Y')and(yesno<>'y') end. vo+DIFFUS.PASX  !"#$%&'()*+,-./0123456789:;<o=>?@ABCDEFGHIJKLMNOPQRSTUVWO4).ضaW~˷\RhS\XA6:1Wӗ'vs]AͶvSF;\rţxW 準+ԒWkuq} 3ϟZ`7oGlZxZf|ږo~l=%/klc;=kGjݛqZf|σw6}峹xֽwǛ%0N=N.^>k r~NavuoƧݱ͙W gn]L\Ժ7\ ג~!kIEXOs-㿿qOs-ɨa\Bgu-W\DWaۓM[aDCo8d=]xZ; Os]K-W+>/owgkc 2w0M{"%C\Kf~~kLxb[2Z2u,m쾳Z2^4hðqZk_Oyח?s]K-O4>lڸk!6n6΋Ps]K&~+~q"\גɋklօ~+ج޲K^ZޘZ2yBv~+B=yjۇL\גɋӜWw6}⺖L^w41w6}⺖LF [9x?3)\גɋ:lwֳ9.^[ ;u1q]K-WlSgĮuİyMÎ'Cu-W+yaAK-/y[v.<:xkkعv_Ko޼5~/0M~=h#޴6Fou-Ete.+уj\ג?b۵y\DW纖\9uc>ZҠ̅ðqs-; m쾳Zrq f׾kcO4>lڸkZ`\r~>kaG.&k rj׾kc.s] _DױnNv+vMSg6#׵Eti9)u<\\ws-0}yEt8F :l͵]?@ABw]ua//_޸ZA]ApqҺPNj0V^{DDb VX.'5W+ ]&M)@Sx8U: ACQj\. O?5ֵrRqP`SCLV )նch)նchf*;o^'b yކlSWxhFjoq0b jo\?0ojy׭Fcs< 1q;oכFcb jΏ^{1X~ pЙ~)a4f 4ӥHgCmC!K̭!KwCw1d!36l// @,P{rak~jswYv1d ] Yb] Yb..0.-,\Nj0V@X~_ r_B@]i]k('5W+x j 6?;l5a߼kᴞh/,S1i̢XV. UŰt)uvٺKlgl%6[wlM 4ӥH]b}ٺKlvl%fl_^t9]Bİbv.]ȚlI< I H%tv )x {8Ԋ없0o - hSo=P/}'|l0GMaQIxahg^`~CHH#- CSJi^`~F'Fh4r/i(R[@ 4$O:;%] O[}AJz)aDEJL #Pʯ/RaHKCדN #P!/HHm_iFhW[I0ТqŭO'x2† R8Pذ_Jx C{q jE¤jk_f|σw6}峹xֽwǛ%0N=N.^>k r~NavuoƧݱ͙W gn]L\Ժ7\ 326 } { evaluation of the gaussian error function } var x,ans : real; done : boolean; function erf(x: real): real; { infinite series expansion of the Gaussian error function } const sqrtpi = 1.7724538; tol = 1.0E-6; var x2,sum,sum1,term: real; i : integer; begin if x=0.0 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 yDpHM4 qHM4 !m6(:+܇yD Faz<֝ot&=h3ٿD0YY+h3:+:+|etFg8$tV(LgtV (LgtV (LDH:+YZ7( Yu sHp@gtVxDǐxD(@iYY~@gЀ jݬHlR^c=k|+݂D2Q5$|+ݲ!8BZ/͡_Q;ֺƷ-HFlrt :+ԯU4j4!=A7B(L,ۼ>8г1ZKl?5=?̻.E5ס8nWрvu(]SC1(ծvtWMATR1.PASH o !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGS}9R KOyʕ(S<uO84JeJj<bC?/eMV3HFzU#W/VQ~*k}jeYOQNm:6}o?dp8|\Zf2U(w[?uf[[,61vc z~*F{ہ!S}jeo-Q_ ϋ%Уܱ+g~tcUKi>~d*SY:O7q|;_buǏ߆Y;R u4m)yiYvqcjw9bY/x'F힗!Â}3Ombm?b.־XpcjkͻłxTQ˳m?UKi>2U.ޞct3o7yX.f;\c}gqyn. ͻłxT觲+g~t>|e*SY]>? o-V1}3q3oY\Z-.>rJ^ZvquF{{8|\Z9drC9qxX2dңmT֙ѧon<uO84J'iKydOqf3/CKa1ZgFھbY~Z_puF%x>o TVv}ۏn]*oѭY^o|m*g%Уܱ+V}ۏn y}71ϷO֛o؞,V0yo]~ozcU.ZYwK/X<ҪooUy,L]*>:nc{~cARxi[ h,}ۏ^__)>yS=oG hoam(w[?b]}VW?\˳/__/Ͼ\~} 26 } {find mean and standard deviation } const max = 80; type ary = array[1..max]of real; var x : ary; i,n : integer; mean,std: real; {$I MEANSTD.PAS} begin { MAIN program } ClrScr; writeln; writeln('Calculation of mean and standard deviation'); repeat write('How many points? '); readln(n) until n<=max; for i:=1 to n do begin write(i:3,':'); readln(x[i]) end; meanstd(x,n,mean,std); writeln(chr(7),'For ',n:3,' points, mean= ',mean:8:4,' sigma= ',std:8:4) end. { MAIN program } procedure meanstd (x : ary; {array of values} length : integer; var mean : real; var std_dev : real); var i : integer; sum_x,sum_sq : real; begin {main} sum_x:=0; sum_sq:=0; for i:=1 to length do begin sum_x:=sum_x+x[i]; sum_sq:=sum_sq+x[i]*x[i] end; mean:=sum_x/length; std_dev:=sqrt((sum_sq-sqr(sum_x)/length)/(length-1)) end { procedure meanstd }; CFIT1 PAS MCFIT1A PAS Xprogram newdr; { -> 243 } var x,x2 : real; alldone : boolean; error : boolean; procedure func(x: real; var fx,dfx: real); begin fx:=x*x-2.0; dfx:=2.0*x end; { func } procedure newton(var x: real); const tol = 1.0E-6; var fx,dfx,dx,x1: real; begin { newton } repeat x1:=x; func(x,fx,dfx); dx:=fx/dfx; x:=x1-dx; writeln('x=',x1,' fx=',fx,' dfx=',dfx); until abs(dx)<=abs(tol*x) end; { newton } begin { main program } ClrScr; writeln; x:=2.0; { first guess } newton(x); writeln; writeln(chr(7),'The solution is ',x); writeln end.  Xprogram newdr; { -> 245 } var x,x2 : real; alldone : boolean; error : boolean; procedure func(x: real; var fx,dfx: real); begin fx:=x*x-2.0; dfx:=2.0*x end; { func } procedure newton(var x: real); const tol = 1.0E-6; var fx,dfx,dx,x1: real; begin { newton } repeat x1:=x; func(x,fx,dfx); if(abs(dfx)=0.0) then dfx:=tol else dfx := -tol end; dx:=fx/dfx; x:=x1-dx; writeln('x=',x1,',fx=',fx,',dfx=',dfx); until abs(dx)<=abs(tol*x) end; { newton } begin { main program } alldone:=false; repeat writeln; write('First guess (999. to exit): '); { first guess } readln(x); if x=999. then alldone:=true else begin newton(x); writeln; writeln('The solution is ',x); writeln end until alldone end. program newdr3; { -> 257 } var x,x2 : real; alldone : boolean; error : boolean; procedure func(x: real; var fx,dfx: real); { the vapor pressure of lead } const a = 18.19; b = -23180.0; c = -.8858; logp = -4.60517 { ln(.01) } begin fx:= a + b/x + c*ln(x) - logp; dfx:= -b/(x*x) + c/x end; { func } { procedure newton(var x: real);} const tol = 1.0E-6; var fx,dfx,dx,x1: real; begin { newton } repeat x1:=x; func(x,fx,dfx); if(abs(dfx)=0.0) then dfx:=tol else dfx := -tol end; dx:=fx/dfx; x:=x1-dx; writeln('x=',x1,',fx=',fx,',dfx=',dfx); until abs(dx)<=abs(tol*x) end; { newton } begin { main program } alldone:=false; repeat writeln; write('First guess (999. to exit): '); { first guess } readln(x); if x=999. then alldone:=true else begin newton(x); writeln; writeln('The solution is ',x); writeln end until alldone end. GD-LINF2LIB JULIAN LIB LEAST1 PAS  { -> 249 } procedure newton(var x: real); const tol = 1.0E-6; var fx,dfx,dx,x1 : real; begin { newton } error:=false; repeat x1:=x; func(x,fx,dfx); if dfx=0.0 then begin error:=true; x:=1.0; writeln(chr(7),'ERROR: slope zero') end else begin dx:=fx/dfx; x:=x1-dx; writeln('x=',x,' fx=',fx,' dfx=',dfx) end until error or (abs(dx)<=abs(tol*x)) end; { newton } viNEWTON-L.LIB7 o !"#$%&'()*+,-./0123456|׿ErK6ڃ8-pm]s /H:u ?FqUR+ !xSGBЧ}$~ O!B['z]ծT]"!5T(UeFmss0B"^ʑi/H.2O6oo2[x~a7?,6lӎ mN|FR5:E#H<^e2![!d+ѹO0doEHH?o-Q_ ϋ%Уܱ+g~tcUKi>~d*SY:O7q|;_buǏ߆Y;R u4m)yiYvvjNLIN3.PASW  !o"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVorPڗ^;/=w4\L1+ o"/7yD۴Ci1%)c\ng+C4n.?xoY6jZ{Mě,mxoիi+zx9lLȫVͺr~ibӆyj3y&Z.rVr[Wi{W.{6dLn)C]2jZ.\1Uԕ)sޝ%igsItyJ.qp1.Ȕn;RȔnՋM\:2vV-VHisO$2|޲>OYK)mnY4 ڸwq_{ݝtM`o_^ww7돷n|~\^ww_tۏS`t?>ݏӏS`z?^ww_tӾ[0}߾ݏO?ޞ݂~uw~\O7?]rq=1oh64܏z|W?r-Ϸw~\ww:Ί뵾Mn.b1fv<޲"v2nnM6S^F>OYK)mn=,xeC2ǡu ^fО_oOyCc8~eC{R/܏_}wie92l\h݂Y8';_pi<9n&)zü]l6/qhO.6qyWZ߱F2G^ e9[2i5_pqC\\x-xeC{8>y}8^LW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ju3]~(YM'61_g=%կ7qW3gܵi㸅{%O>6|}-9jג%m{]֒%/zU=./vOkIKz5%!nY&ׅ&>Mc3_y(YE1Lc:%!nMc: gS'~x(E\p2.MJr!K19֩3.,P돋%Z/}RI?Z$N][5PÚ~ۧkIEWZvu?^n_ג{a׵$,wm?,/kIXrvkIͧV?%agǷ$ ԪMfgokI6bOT돋%7,/r,way׵$_%^\ڎ&ܵZ/q2.79\r@ܰZ=]&܅%^ג%^\ڎ&ܵZ=k!=q2.<e>qk]o5i- |mXS}m- Km՗a 㞅p3mpK7$Km՗y?,]T_2~[KRE/rvkI6bO԰*$UR?KmL 0_o֒P۵$j:}ZKB̟?ܴ:k-YnNa͜1չ:ҨaP돋%v}|jUZ/qC̟HEWw~*Y%EPޮ%|zK}vOy*9rs>Yq wjX<mu{>E%tkqWEipQ丙6?'jXTrt_?\j1԰x(qO0#%w/~n>s<{77L̟?J%:9\r@̟?ܴ:k-9`WEuY0_WG[S%L:MGJtkqoO븧S$|ڢ;ߟ֒p3mpK $z?OkIEWZ>mi#[_8O%ERE%^}OkIEWZ>mU]R>c{y(Y_7)1]#SnU9kr{ӭZj)mnե8^=,GWp{9>;:^=,p{ԑЭgXZhxoAw۫gl.#[0^=, { -> 35 } function randg(mean,sigma: real): real; { produce random numbers with a gaussian distribution } { MEAN and SIGMA are supplied by calling program } { function RANDOM is required !!! } var i : integer; sum : real; begin sum:=0.0; for i:=1 to 12 do sum:=sum+random(0); randg:=(sum-6)*sigma+mean end; { function randg } function random(dummy: integer): real; { --> 29} { random number 0-1 } { DEFINE SEED=4.0 AS GLOBAL !!!!!!!! } { adapted from HP-35 applications programs } const pi = 3.14159; var x : real; i : integer; begin { RANDOM } x:=seed+pi; x:=exp(5.0*ln(x)); seed:=x-trunc(x); random:=seed end; { RANDOM } PROGRAM rantst(output); { test random number generator RANDOM } { procedure MEANSTD and function RANDOM are also required } TYPE ary = ARRAY[1..100] of REAL; VAR x:ary; n,i,j:INTEGER; r,mean,std,seed:REAL; {$I RANDOM.LIB} {$I MEANSTD.LIB} BEGIN {main program} seed:=4.0; n:=48; writeln; writeln(' mean std dev'); writeln(' (0.5) (0.2887)'); writeln(' ==============================='); FOR j:= 1 to 20 DO BEGIN FOR i:=1 to n DO x[i]:=RANDOM(0); MEANSTD(x,n,mean,std); writeln(mean:10:4,std:10:4) END {j loop} END.AST4 PAS !LEAST5 PAS #vROMB1.PASU  !o"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTqKiۛk>_7xes37/DilU_o22׶yocf>qڢCF?m{=QE2dd|]fWWEr9Q4.CkO/.W6x2ʱɸpͣ矮2Ӑ/Z"J\d'*gymDѸ ocaah\.l2_ |_F1[ě|]fWx܊n׳rx7ƒ}{K?m=vdvc!Xn柿)!uRZ}⦵Euù|>>3rZ_Ϸz]X!l{~lmϯDѸ0d 85kZrА*i=ACg]0!|u͐'-up5gҞ\~ϺaȀi8^],~ryCԻ! -Vx?~\>ݰo7n0Ӻ6.KN7qj>O<|2մ.IK?\ p2[4dwv`wUY:L?}9du-!͐5m?=X7n +详~2ۇ͐ݫi8ڶ/ݫCstqlm6_jNն} voӐI_ޟ׻WC?3ؽ}>R짛>?B0oεO7~io~Yryݶxsw޽ioږK 9{{jִrZb>ϛrFgw{dz3:fMk-g2:*iLݭ|i诙{dM f 00}|z͗~?yqdz{v;e&}).C,ʴn=2lW{|Ȁ'eZ?@ABCDEFGHIJKLMNOPQRSKh[n~ =`+&[G{%{;QX`Ucɹy.ڍVskE]Ӗ9M1a״e5>#i) ,<`Uy) !ü.%5Z\(KV;]6f^aRc=jfv.#龭kҽCSLA95jDxhi PmI:bBV.:l6a l!}AIގxSs#j?өn; +CAG:~uSw{b nzj<6&*:Ӂ^>9WvWFK_/ydeBA؍L|i~Ɩ<4ń KVhb Vb ԙ €Zw]FJ&Y}1uMzt&_:'{$un]Oa캽/FJ&YAP0/^0д/ATS4¨& u0iƖxwaTZwj 0tu5wAՔ|Qg:P0ids[פI/oLj0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ϧiܼ}gO^׻Yc~'#+p+lחO~Mz -t _ ʣM#xb\>es#ͬp(l{S *C>[Khg4W}lƻ9g@cq&/y۲ÓoW1ot*pϦi{l.ò9glq^ ^,ˇ _M#xb\~\z樒ܔ|ŋ֒ݭi<l7/~zMzQtcFqᠰQU4Wy8F͋^?=ˣxe#SQq㵥N#xz9lGGl4QAo(ݘ÷Qv4_ ĺU4W>y~6LC=,s·Qvܔv`saSV8͕O>FqsaSpwe#jWOnn8͕O>F>esû2$4'[!)ݍ9|e+idw׊[vʣ*׏Φi|aٜp(~,פ%/{)WY,[1P4Wl/aٜ#ͬplU|2|EOHO#wyQ_]NsoΦi~esWe7o/ȣ(~s: \y4wZت ZB=IGM%u\&42o7~7pwOݧӧ޽X6lt|DOC^  !o"vSIMP1.PASM  !"#$%&'()*+,-.o/0123456789:;<=>?@ABCDEFGHIJKLtE l]9Wu}/x NRaM zx7gqߴz| >TͺRs *)Xk? 45PR%5OI#:b }I )tF `߼RU}Ī7X{(?P֊R.}( AB*)8hG!H?b]ao3NG zX:A_H! ] )8b3vWR+7  ѣXqTzȔbhB $j[ t UIQsCt'ӲvϹef2ef)j\ TIQKq]7&ҁT%ŕHKq=WRR mt.S X+)s5ڏ/nR m?URt'ӲvMo*)2enRmG] `n$[~s9tɔbh/M%()Xgn Q @t@|yڝ)M7RH=%^ɴ]ѝL|-kWIܲvMo*){^6ѣX^ _`ut/nR m}:7S%EsnY9m~dr%v֮F2en?7sݞ ɴtɔbh/M%vEHɌ@8v6&Ͽv d#kڝp1taI 2` $W:XSG` NRHeP@ ;7.Tme#%SIuR.}YXL%()qƟ}P:YI 2y/_ w޶巯?m۽m>W>`{7o~_O^ݽ{ڪ?cǐnfi:֒mF_(;ů^[U8͕/>9Fͦ9÷QvYq1ݺu5\Fޖprogram simp2; { -> 278 } { integration by Simpson's method } { Turbo Pascal cannot pass function names as arguments} const tol = 1.0E-6; var sum,upper,lower : real; function fx(x: real): real; { find f(x)=1/x } { watch out for x=0 } begin fx:=1.0/x end; { function fx } function dfx(x:real):real; begin dfx:=-1.0/sqr(x) end; {$I simps.lib} begin { main program } ClrScr; lower:=1.0; upper:=9.0; writeln; simps(lower,upper,tol,sum); writeln; writeln(chr(7),'area= ',sum) end. BESY PAS CFIT1 PAS MCFIT1A PAS X { -> 278 } procedure simps( lower,upper,tol : real; var sum : real); { numerical integration by Simpson's rule } { function is fx, limits are lower and upper } { with number of regions equal to pieces } { partition is delta_x, answer is sum } var i : integer; x,delta_x,even_sum, odd_sum,end_sum, end_cor,sum1 : real; pieces : integer; begin pieces:=2; delta_x:=(upper-lower)/pieces; odd_sum:=fx(lower+delta_x); even_sum:=0.0; end_sum:=fx(lower)+fx(upper); end_cor:=dfx(lower)-dfx(upper); sum:=(end_sum+4.0*odd_sum)*delta_x/3.0; repeat pieces:=pieces*2; sum1:=sum; delta_x:=(upper-lower)/pieces; even_sum:=even_sum+odd_sum; odd_sum:=0.0; for i:=1 to pieces div 2 do begin x:=lower+delta_x*(2.0*i-1.0); odd_sum:=odd_sum+fx(x) end; sum:=(7.0*end_sum+14.0*even_sum+16.00*odd_sum +end_cor*delta_x)*delta_x/15.0; until (sum<>sum1) and (abs(sum-sum1)<=abs(tol*sum)) end; { simps } -rvSIMQ1.PAST  !"#$o%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSt=ibk\U.ؘ36{6;XW'}e"aT8M16xW`7᪢yW;8'{\TTlh-ٴۙ~&S%hq li;^^^y`2URQ9myZ "D3nER.fROTbK1Cj8Db3,ȸaQ0'ka }Tbp26H*18xL**da_ 'S5T`q9 i UEd83g'N**Kꃋlw7Lɾ\UKK*ּ3IXxF+Xܫ>.NR->ۖ!;IclpȽJ\RJ, \nT"dLͣJ$'ԏKömǤd Q\TKK*3B^z8^qI}p* ϸeCU"p`i0S(osurT"p`r6ۖ7J$'?8X ˓ yZL9[d眬 < W%x}GyÄW'U fza WWA}\x-[`=rByBy 9Ya9& ,]++9%~lmq`rCc˿d@\T_ #\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KEm2ne8N!'uJ|Bw_C.ePB||ؿJo;Y;Y-NHN13qh%ďKǥ6RjK=&_uk|~ѩ)f& u(%RwW5\^:%GX&{q5rRM5Mæz~AJ%Jomb_rӯ.ø w\zRvӯ.9.=|U*!lf͖bfg3k$neq+郏K%ķS3SLePBԌ3ʺQBR.W3\^7R M`n3X72TN Ԍġn?9/|"Ѓ9|/ar^(!~79.F._J=.F._Q|ǥwOHN13qh%ğT(f|W|R.W$R 1/OHN13qh%]T(f.|W|R.W$R Gb |_C.'uJ_iܹ+W_(ibMhR6>l{m=='+5_ ^CWZ*6}f园H85#bfY7JB -|OJ%ķ wk}|ePBPBm܅bF/iU*!\N1ޗyR QNg3ϺQBQu FwYN ~MhwRkhܹ+bfY7J w/ۇy86c6dFߩo`וJYcƖJ4~hLFźTfDSLJ%?}ryGA0R O\G|͖3+(i677ΏdlCf)QuTI[S*Qar^(S3)f& u9/zE13}/ZO|+R~E1+%GXJ ,}W3R Ԍ<)f& uѻ^Q̼[?%,u\)!>źT3R Ox/9|//۩ġúQBPBS3,f& [֍.Fg%,u\Qc{](3QwKeN ~..Fg6J~6KR_i7f?ޅ,RO;cxP*Q&nF Ⱦb XS:%J>J@S}f֔J|ؿJԌhCÖuٖK(ڕJbtfs_*kx@J%Jħc~g6UT\G7*QB|# wU{ wU.'~T}f֔(!>>Xc 6Tb5$uJĉw_}[N6h͸ [Rrǥ3J`K1K%0׃coBhCͻ_J%ǩ3ϺQB|;5#OCg(!~t\ K]?Wfg>#ޑR zk ξ5gR q>]5_ .FgǻR )fOR 񱥘J;x6܍~@_/~~O-_O~ procedure { bubble- } sort(var a: ary; n: integer); {--> 173} var i,j : integer; hold : real; begin { procedure sort } for i:=1 to n-1 do for j:=i+1 to n do begin if a[i]>a[j] then begin hold:=a[i]; a[i]:=a[j]; a[j]:=hold end end { for } end; { procedure sort } IB (MATR1 PAS ) { --> 176} procedure {bubble} sort(var a: ary; n: integer); { adapted from 'Introduction to PASCAL', R.Zaks, Sybex, 1980 } var no_change : boolean; j : integer; procedure swap(p,q: real); var hold : real; begin hold:=p; p:=q; q:=hold end; { swap } begin { procedure sort } repeat no_change:=true; for j:=1 to n-1 do begin if a[j]>a[j+1] then begin swap(a[j],a[j+1]); no_change:=false end end { for } until no_change end; { procedure sort }  { --> 183} procedure sort(var x: ary; n: integer); { a NONRECURSIVE quicksort routine } { Adapted from 'Software-Tools', B.Kernighan, Addison Wesley, 1976 } var left,right : array[1..20] of integer; i,j,sp,mid : integer; pivot : real; procedure swap(var p,q: real); var hold : real; begin hold:=p; p:=q; q:=hold end; { swap } begin left[1]:=1; right[1]:=n; sp:=1; while sp>0 do begin if left[sp]>=right[sp] then sp:=sp-1 else begin i:=left[sp]; j:=right[sp]; pivot:=x[j]; mid:=(i+j)div 2; if (j-i)>5 then if ((x[mid]x[i])) or ((x[mid]>pivot)and(x[mid]pivot)) or ((x[i]>x[mid])and(x[i]=right[sp]-i then begin { put shorter part first } left[sp+1]:=left[sp]; right[sp+1]:=i-1; left[sp]:=i+1 end else begin left[sp+1]:=i+1; right[sp+1]:=right[sp]; right[sp]:=i-1 end; sp:=sp+1 { push stack } end { if } end { while } end; { QUICK SORT }  { --> 180} procedure {quick} sort(var x: ary; n: integer); { a RECURSIVE sorting routine } { Adapted from 'The design of Well-Structured and Correct Programs', S. Alagic, Springer-Verlag, 1978 } procedure qsort(var x: ary; m,n: integer); var i,j : integer; procedure partit(var a: ary; var i,j: integer; left,right: integer); var pivot : real; procedure swap(var p,q: real); var hold : real; begin hold:=p; p:=q; q:=hold end; { swap } begin pivot:=a[(left+right)div 2]; i:=left; j:=right; while i<=j do begin while a[i] 178} procedure {shell} sort(var a: ary; n: integer); { Shell-Metzner sort } { Adapted from 'Programming in pascal', P. Grogono, Addison-Wesley, 1980 } var done : boolean; jump,i,j: integer; procedure swap(var p,q: real); var hold : real; begin hold:=p; p:=q; q:=hold end; { swap } begin jump:=n; while jump>1 do begin jump:=jump div 2; repeat done:=true; for j:=1 to n do begin i:=j+jump; if a[j]>a[i] then begin swap(a[j],a[i]); done:=false end { if } end { for } until done end { while } end; { SORT }  procedure square(x: ary2; y: ary; var a: ary2s; var g: arys; nrow,ncol: integer); { matrix multiplication routine } { a= transpose x times x } { g= y times x } var i,k,l : integer; begin { square } for k:=1 to ncol do begin for l:=1 to k do begin a[k,l]:=0.0; for i:=1 to nrow do begin a[k,l]:=a[k,l]+x[i,l]*x[i,k]; if k<>l then a[l,k]:=a[k,l] end end; { l-loop } g[k]:=0.0; for i:=1 to nrow do g[k]:=g[k]+y[i]*x[i,k] end { k-loop } end; { square } program trap1; { -> 264 } { integration by the trapezoidal rule } var done : boolean; sum,upper,lower : real; pieces : integer; function fx(x: real): real; { find f(x)=1/x } { watch out for x=0 ! } begin fx:=1.0/x end; procedure trapez(lower,upper : real; pieces : integer; var sum : real); { numerical integration by the trapezoid method } { function is FX, limits are LOWER and UPPER } { with number of regions equal to PIECES } { fixed partition is DELTA_X, answer is SUM } var i : integer; x,delta_x,esum,psum : real; begin delta_x:=(upper-lower)/pieces; esum:=fx(lower)+fx(upper); psum:=0.0; for i:=1 to pieces do begin x:=lower+i*delta_x; psum:=psum+fx(x) end; sum:=(esum+2.0*psum)*delta_x*0.5 end; { TRAPEZ } begin { main program } done:=false; lower:=1.0; upper:=9.0; writeln; repeat write('How many sections? '); readln(pieces); if pieces<0 then done:=true else begin trapez(lower,upper,pieces,sum); writeln('area=',sum) end until done end. program trap2; { -> 266 } { integration by the trapezoidal rule } const tol = 1.0E-6; var sum,upper,lower : real; function fx(x: real): real; { find f(x)=1/x } { watch out for x=0 ! } begin fx:=1.0/x end; procedure trapez(lower,upper,tol: real; var sum : real); { numerical integration by the trapezoid method } { function is FX, limits are LOWER and UPPER } { with number of regions equal to PIECES } { fixed partition is DELTA_X, answer is SUM } var pieces,i : integer; x,delta_x,end_sum,mid_sum,sum1 : real; begin pieces:=1; delta_x:=(upper-lower)/pieces; end_sum:=fx(lower)+fx(upper); sum:=end_sum*delta_x/2.0; writeln(' 1',sum); mid_sum:=0.0; repeat pieces:=pieces*2; sum1:=sum; delta_x:=(upper-lower)/pieces; for i:=1 to pieces div 2 do begin x:=lower+delta_x*(2.0*i-1.0); mid_sum:=mid_sum+fx(x) end; sum:=(end_sum+2.0*mid_sum)*delta_x*0.5; writeln(pieces:5,sum) until abs(sum-sum1)<=abs(tol*sum) end; { TRAPEZ } begin { main program } ClrScr; lower:=1.0; upper:=9.0; writeln; trapez(lower,upper,tol,sum); writeln; writeln(chr(7),'area=',sum) end. NLEAST4 PAS !LEAST5 PAS #program trap3; { -> 270 } { integration by the trapezoidal rule } const tol = 1.0E-6; var sum,upper,lower : real; function fx(x: real): real; { find f(x)=1/x } { watch out for x=0 ! } begin fx:=1.0/x end; function dfx(x: real): real; begin dfx:=-1.0/sqr(x) end; {$I trapez.lib} begin { main program } ClrScr; lower:=1.0; upper:=9.0; writeln; trapez(lower,upper,tol,sum); writeln; writeln(chr(7),'area=',sum) end. -r { -> 270 } procedure trapez( lower,upper,tol: real; var sum : real); { numerical integration by the trapezoid method } { function is f (as parameter), limits are LOWER and UPPER } { with number of regions equal to PIECES } { fixed partition is DELTA_X, answer is SUM } var pieces,i : integer; x,delta_x,end_sum,mid_sum, end_cor,sum1 : real; begin pieces:=1; delta_x:=(upper-lower)/pieces; end_sum:=fx(lower)+fx(upper); end_cor:=(dfx(upper)-dfx(lower))/12.0; sum:=end_sum*delta_x/2.0; writeln(' 1',sum); mid_sum:=0.0; repeat pieces:=pieces*2; sum1:=sum; delta_x:=(upper-lower)/pieces; for i:=1 to pieces div 2 do begin x:=lower+delta_x*(2.0*i-1.0); mid_sum:=mid_sum+fx(x) end; sum:=(end_sum+2.0*mid_sum)*delta_x*0.5-sqr(delta_x)*end_cor; writeln(pieces:5,sum) until abs(sum-sum1)<=abs(tol*sum) end; { TRAPEZ } EANSTD LIB +=NEWDR PAS ,kNEWDR2 PAS -rvTSTBES.PASB o !"#$%&'()*+,-./0123456789:;<=>?@A鲷::/|?~~jTWq1:k9%Wmwy_)) ]|qJS5>t~wxzpp鸆?_ijv٦x S^Ay~0[] lWkӲ0wj5<XnlOn쟯O]=^aϗmZ6Mt\>v?ߝ:eٮ'>|/۴lmx89aϗmڲ])My1pskXy mwy_)y Sr1>Οs ]m_ڕWwy_)9QGJ^~~mwy_))\ ^S:n޸y/?o~\[ܟ]K>+àPۭ.K?;rz~U2ey nq=-evO7W59gUm\OksY5 ]j[Yf ӲfOOW}SvR~Vgk0z0j60ʋrV^ .K S+k.Nek5 ]j۷^_/|?ao]bS5qϗ_\RVߴ e]~\sW|\^vy_Ў2Vc|8?E?Mye)V^<}{K\GBͱؐw% program tstgam; { -> 340 } { test the gamma function } var x : real; external procedure cls; function gamma(x: real): real; const pi = 3.1415926; var i,j : integer; y,gam : real; begin { gamma function } if x>=0.0 then begin y:=x+2.0; gam:=sqrt(2*pi/y)*exp(y*ln(y)+(1-1/(30*y*y))/(12*y)-y); gamma:=gam/(x*(x+1)) end else { x<0 } begin j:=0; y:=x; repeat j:=j+1; y:=y+1.0 until y>0.0; gam:=gamma(y); { recursive call } for i:=0 to j-1 do gam:=gam/(x+i); gamma:=gam end { x<0 } end; { gamma function } begin cls; writeln; repeat repeat write('X: '); read(x) until x<>0.0; writeln('Gamma is ',gamma(x)) until x<-22.0; end.