Archived

This topic is now archived and is closed to further replies.

JYoung

Trig Question

Recommended Posts

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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites