954,582 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

tan of circle how to get correct results

hello all i need to get the tangent of a circle command into a programe as follows tan (angle of degree/2)

trying just 90degrees /2 =45degrees tan(45) in intermediate window i get 1.619 which is radians , to convert to degrees its 180/pi (3.142) but this gives result of 92.806. rather than 1

if using windows calculator tan 45 =1 which is correct, but have tried all ways to try and get tan command to give the same result , so how can this be done.

thank you

mickyboy
Newbie Poster
19 posts since Jul 2005
Reputation Points: 10
Solved Threads: 0
 

The tan function is expecting the argument to be in radians so convert your 45 degrees to radians before doing the tan. You can confirm this in windows calculator by setting the units to RAD and doing a tan of 45. Hey presto it gives you 1.619 :mrgreen:

mnemtsas
Posting Whiz in Training
200 posts since Jul 2004
Reputation Points: 16
Solved Threads: 1
 

thanks mark
i was trying to turn tan 45=1.6 radians and then convert to degrees the book i have does not make the fact you have to turn say 45 degrees into (radians first) then do tan command that clear.

mickyboy
Newbie Poster
19 posts since Jul 2005
Reputation Points: 10
Solved Threads: 0
 

Nice Response there mnemtsas, and should you need any further information regarding Tan (or other commands): http://www.int.gu.edu.au/courses/3008int/m03/FYI/Command_Syntax.htm#Heading197

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You