Help with tangents
Author |
Message |
CodeMonkey2000
|
Posted: Sat May 19, 2007 12:57 pm Post subject: 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? ![Sad Sad](http://compsci.ca/v3/images/smiles/icon_sad.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
richcash
|
Posted: Sat May 19, 2007 1:17 pm Post subject: Re: Help with tangents |
|
|
tan(x) = sin(x)/cos(x)
[edit]Or sind(x)/cosd(x) for degrees obviously. |
|
|
|
|
![](images/spacer.gif) |
DIIST
![](http://compsci.ca/v3/uploads/user_avatars/248212014b7d9f60741cd.jpg)
|
Posted: Sat May 19, 2007 1:36 pm Post subject: 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 Wink](http://compsci.ca/v3/images/smiles/icon_wink.gif) |
|
|
|
|
![](images/spacer.gif) |
CodeMonkey2000
|
Posted: Sun May 20, 2007 8:17 pm Post subject: 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? |
|
|
|
|
![](images/spacer.gif) |
Mazer
![](http://compsci.ca/v3/uploads/user_avatars/1323750815476d9f446d80c.png)
|
Posted: Sun May 20, 2007 9:20 pm Post subject: 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. |
|
|
|
|
![](images/spacer.gif) |
CodeMonkey2000
|
Posted: Mon May 21, 2007 1:28 pm Post subject: RE:Help with tangents |
|
|
My version of turing only has sin, cos, tan, arctan and arctand. arccos and arcsin don't exist. |
|
|
|
|
![](images/spacer.gif) |
DIIST
![](http://compsci.ca/v3/uploads/user_avatars/248212014b7d9f60741cd.jpg)
|
Posted: Mon May 21, 2007 2:15 pm Post subject: 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 Wink](http://compsci.ca/v3/images/smiles/icon_wink.gif) |
|
|
|
|
![](images/spacer.gif) |
|
|