problems in atan and atan2 function in mbed.

15 Mar 2013

i am using the atan and atan2 function for finding the inverse tan of two signals then some time atan and atan2 gives perfect inverse function and some times it doesn't give . i don't understand behavior of this function is that dependent on the data type or any thing else ?

i have loaded header file math.h and return value storing in double type variable .

15 Mar 2013

Can you post some sample values where you get bad results?

24 Jun 2013

A couple of areas to look at the values of the inputs and make sure the result is correct but in a different quadrant then you think, look at the documentation of atan() to see what quadrants it will return the values in.

The other thing to remember is that the trig function return the angle in radians, this has cost quite a few hours in the last 30 years, you might think I would learn Huh!

wade