Trig Question

Started by
5 comments, last by JYoung 21 years, 3 months ago
i noticed in the header file "math.h" there is sin , cos , and tan. The problem is that i couldn''t find an arctan,arcsin, and arccos. Anyone know where i can find these functions in either math.h, another header, or its algebraic equivilent? - Thanks JYoung
Advertisement
The functions you want are asin, acos, and atan. They are also in math.h, at least according to my documentation.
quote:Original post by mmelson
The functions you want are asin, acos, and atan. They are also in math.h, at least according to my documentation.


i tried them, they aren''t working the way the are supposed to.

if i do:
acos(.672); // on my pc
//this = .80..etc

cos^-1(.672 // graphing calc
this = 47.77

Anyone know any other header file? Or why this is happening?
remember they return radians not degrees..

=*=
If things seem bad, think that they can get a whole load worse, and they don''t seem so bad anymore

=*=
I didn''t check the numbers, so I don''t know if this is your problem, but are you confusing degrees and radians? Most graphing calculators use degrees by default, but the math.h functions use radians.

If you were to take a circle with a radius of 1, and measured out an arc on that circle of length 1, then the angle that subtends that arc would be one radian. The radian is a more natural way of measuring angles than the arbitrary 360o degree system we''re accustomed to. Using the geometry you already know, you''ll find that there are 2*pi radians in a circle. So to convert from degrees to radians, divide by 180 and multiply by pi; to convert from radians to degrees divide by pi and multiply by 180.

Sorry if you already knew this.
quote:Original post by TerranFury
I didn''t check the numbers, so I don''t know if this is your problem, but are you confusing degrees and radians? Most graphing calculators use degrees by default, but the math.h functions use radians.



Bingo, thanks a bunch guys.

JYoung
I dunno what math you''re in, but that gets even worse as you go up. In first year calc, and trig too even, constantly had to switch between radians and degrees, depending on the problem. It was confusing, but after a while of doing it, you kind of get the idea of what is wrong for a result (ie: you used the wrong mode) My teacher used to remind us to check our mode before taking any test
Peon

This topic is closed to new replies.

Advertisement