function y=phi(x);
// computing inverse of sin

eps=0.00001;

lo=0;
hi=3.1415/2;
flo=sin(lo);
fhi=sin(hi);
mid=(hi+lo)/2;
fmid=sin(mid);

while abs(x-fmid)>eps

if x>fmid 
lo=mid;
flo=fmid;
else
hi=mid;
fhi=fmid;
end;

mid=(hi+lo)/2;
fmid=sin(mid);

end;

y=mid;

endfunction;
