Boris Herman wrote:
If there's interest, I could add ArcSin and ArcCos to the runtime library.
This would be great!
I've found out that I get more precision by using this self-written function:
function ArcSin(x:double):double; const c1=1e-6; begin if abs(x-1)<c1 then ArcSin:=pi/2 else if abs(1+x)<c1 then ArcSin:=-pi/2 else ArcSin:=ArcTan(x/sqrt(1-sqr(x))); end;
I hope Emil will comment on the numeric stability of this function etc. I'm a bit worried about the c1 definition. It might be suitable for the Double type on your platform, but I think a general function should try to work with MinReal, EpsReal etc.
If this is worked out, I could include such a function (and a corresponding ArcCos). Otherwise, I can still refer to the libm functions ...
Frank