Go Down

Topic: Inverse trig functions (Read 20054 times) previous topic - next topic


Hi all, I am just getting started with the Arduino and as I was reading through the programming reference I saw that the trig functions sin, cos, and tan are supported, but it looks like the inverse functions arcsin, arccos, and arctan are not.

My application will need some of these inverse functions. Is there any easy way to add them in? Do I need to modify and rebuild the Arduino compiler to do it?

Thanks much!


Looks like those functions exist to me. You can use avr lib-c from arduino:



Oh cool. I was going by the reference list given at http://arduino.cc/en/Reference/Extended which didn't show the inverse functions. I just added the library reference and the code compiled without errors.

Thanks much!


It's an open secret around these parts that the Arduino uses C/C++ "under the hood". :-) The Arduino documentation is deliberately a subset of all available functions and syntax in order to keep the learning overhead low.


Go Up