function arccos(x:double):double;
begin
for n:=0 to 15707963267949 do
begin
t:=abs(cos(n/1000000000000)-x);
if t<last then last:=t;
if t>last then
begin
result:=n/1000000000000;
exit;
end;
end;
end;
搞个蠢办法
function ArcTan2(const Y, X: Extended): Extended;
asm
FLD Y
FLD X
FPATAN
FWAIT
end;
function ArcCos(const X: Extended): Extended;
begin
Result := ArcTan2(Sqrt(1 - X * X), X);
end;
//汇编和开方应该行吧?