Inverse trigonometric functions

I’m looking for cyclometric functions Expresions for editor.

I know, that there are circular functions (sin(), cos(), tan()), but I cannot find their inversions.

I specifically need a arctan() in order to calculate polar coordinate’s degree based on Cartesian coordinates:

Any ideas?

Can you work the other way Mellin? Use your time movement in radius and degrees and convert to x,y coords? For example x = cos(dwfss *something) in combination with y = sin(dwfss * something) will get you circular motion. Fooling around with that now


The problem is I use accelerometer data and not time.
As a base it gives me 2 numbers (-10 to 10 each) for each axis and I need to get a angle that they are pointing at.

This cannot be solved other way around.

oh I see… Pythagoras right triangle will get you the radius, but you need that TAN ^-1() to get the angle from the rise and the run (y/x). hmm. i 've got nothing man. sorry.


Facer has an atan function that works in the designer, however it does not work on the actual watch (neither do asin or acos). Unfortunately, Facer refuses to even acknowledge* the problem, much less solve it. You can however, approximate atan, with some error. Obviously, this is not ideal, but then the whole situation isn’t ideal, so here you go:

atan(x) ≈ (((pi*x*(0.596227+x))/(2*x*(1.192454+x)+2)-(pi*(0.596227-x)*x)/(2*(x-1.192454)*x+2))*(1+abs(x)/x))/2+(pi*(0.596227-x)*x)/(2*(x-1.192454)*x+2)

atan2(y, x) ≈ (((pi*y*(0.596227+y/x))/(x*((2*y*(1.192454+y/x))/x+2))-(pi*y*(0.596227-y/x))/(x*((2*y*(y/x-1.192454))/x+2)))*(1+(x*abs(y))/(abs(x)*y)))/2+(pi*(1-abs(x)/x)*abs(y))/(2*y)+(pi*y*(0.596227-y/x))/(x*((2*y*(y/x-1.192454))/x+2))

asin(x) = atan2(x, sqrt(1 - x * x))

acos(x) = atan2(sqrt(1 - x * x), x)

Domain for each function above:
atan: x != 0
atan2: x != 0, y != 0
asin: -1 < x < 1, x != 0
acos: -1 < x < 1, x != 0

Algorithm is from Rafc’s comment on this page: Performing efficient arctangent approximation

  • I emailed Facer when I discovered the problem, posted on the forums, tagged Facer on the forums, and filled out a survey informing Facer of this problem. I was completely ignored. Due to the resulting equation bloat, and Facer’s unwillingness to stand behind their product, I was forced to begin a plain AW implementation. I do hope they step up and fix their software someday (there are numerous reported and ignored bugs all over the forums), but I’m not holding my breath.

1 Like

This is great!

Thank you so much

2 thing:
inside of those 2 square roots is

Also, am I right that:
acotan(x) = atan(1/x)