Kod w języku SAS 4GL

data _null_; do while (1); retain x1 -5000 F2 0.001 x -5000 F 0; F1=cdf('CAUCHY',x1);

minx=x; maxx=5100; Fs=.; do while (1); x2=(minx+maxx)/2; Fs=cdf('CAUCHY',x2); if abs(Fs-F2)F2 then maxx=x2; else minx=x2; end;

if x1=400-0.00001 then x1=x1+100; else if x=50-0.00001 then x1=x1+10; else if x=5-0.00001 then x1=x1+1; else if x=3-0.00001 then x1=x1+0.1; else x1=x1+0.01; end; else do; x=round(x2,0.000001); F=F2; F2=F2+0.001; end; if x>5000 then leave; p=round(pdf('CAUCHY',x),0.0000001); if (x eq 0 or not (-1e-7-5'; else put '| ' p; put '| ' F; end; end; run;