I need to calculate the distance between to points (latitude/longitude) in WebI (SAP system) and I have limited formulas there (don't have : ACOS / ATAN / ATAN2) I have COS / SIN.
I found this formula : (ACOS(COS(RADIANS(90-X1)) *COS(RADIANS(90-X2)) +SIN(RADIANS(90-X1)) *SIN(RADIANS(90-X2)) *COS(RADIANS(Y1-Y2))) *6371)*1000
but I don't have the ACOS formula in Web Intelligence (WebI - SAP ) , if anyone know maybe how to calculate ACOS?
Will appreciate it so much, Mor :)
Let us remember that ArcCos[x]+ArcSin[x]=Pi/2 and that ArcCos[x]=ArcSin[Sqrt[1-x^2]]; I shall assume that x is positive. Then, what you could do is to use Taylor expansions of one or the other functions depending on the value of x. I suggest you switch at x=0.5.
http://en.wikipedia.org/wiki/Inverse_trigonometric_functions#Infinite_series
gives you the general formulas.
There are other alternates such as Pade approximants (you can google for them or I could provide them to you if required). I think that the limitation is : how many terms are you ready to accept for any of these expansions (this is related to the desired accuracy).
We can continue discussing this topic if you want.