
-----------------------------------
CodeMonkey2000
Sat May 19, 2007 12:57 pm

Help with tangents
-----------------------------------
Ok, my version of turing doesn't seem to support tangent functions. I checked in the turing help section, and it only has sin, sind, cos, cosd. I tried using arctan() but it doesn't seem to give me the correct number (I typed in 45, and it didn't give me 1). What do I do now? Is there a way around this? :(

-----------------------------------
richcash
Sat May 19, 2007 1:17 pm

Re: Help with tangents
-----------------------------------
tan(x) = sin(x)/cos(x) ;)

[edit]Or sind(x)/cosd(x) for degrees obviously.

-----------------------------------
DIIST
Sat May 19, 2007 1:36 pm

Re: Help with tangents
-----------------------------------
arctand finds the tan inverse in degrees. arctan finds the tan inverse in radians.
 Try putting arctand(1), you'll  get 45!
 :wink:

-----------------------------------
CodeMonkey2000
Sun May 20, 2007 8:17 pm

Re: Help with tangents
-----------------------------------
Wow, thanks guys. 

EDIT: ok, now I have another problem. How do I do sin/cos/tan inverse? What I was thinking was to search for the given ratio using sin/cos/tan of 1-360. This doesn't seem very practical, is there a better way?

-----------------------------------
Mazer
Sun May 20, 2007 9:20 pm

RE:Help with tangents
-----------------------------------
thuvs already pointed out that arctan() is the inverse of tan(). Similarly, arccos() and arcsin() are the inverses of cos() and sin() respectively.

-----------------------------------
CodeMonkey2000
Mon May 21, 2007 1:28 pm

RE:Help with tangents
-----------------------------------
My version of turing only has sin, cos, tan, arctan and arctand. arccos and arcsin don't exist.

-----------------------------------
DIIST
Mon May 21, 2007 2:15 pm

Re: Help with tangents
-----------------------------------
Here

 arcsin (x) = arctan (sqrt ((x *x) / (1 - (x *x)))) 
 arccos (x) = arctan (sqrt ((1 - (x *x)) / (x *x))) 

likewise:
 arcsind (x) = arctand (sqrt ((x *x) / (1 - (x *x)))) 
 arccosd (x) = arctand (sqrt ((1 - (x *x)) / (x *x))) 

My version of turing dosnt have arcsind or arccosd either. But if you check f10 it will show you the equation for arcsin and cos. Bewary that you need to set limits on this function. For x = 0 and x= 1& -1. Another thing is to use abs, even though i didn't show it in my example you should because sqrt(-)=error :wink:
