Is there any way to make a program to give the 6 trig functions of a given angle in radians/degrees in terms of pi/the square root of 2, even if the angle is above 360 degrees/2pi radians? I'm going for a sort of general program for this so I'm not brute forcing If statements. Thanks in advance!
portal3 wrote:
Is there any way to make a program to give the 6 trig functions of a given angle in radians/degrees in terms of pi/the square root of 2, even if the angle is above 360 degrees/2pi radians? I'm going for a sort of general program for this so I'm not brute forcing If statements. Thanks in advance!



Code:

Lbl I
0->T
Clrhome
Input"Type?",T
Disp "0.Degree"
Disp "1.Radians"
If T=0
Goto D
If T=1
Goto R
If T!=0 or T!=1:Then
Disp "Invalid input"
Goto I
End

Lbl R
Input "Angle?",A
sin(A**r)
Disp "sin : ",Ans
cos(A**r)
Disp "cos : ",Ans
tan(A**r)
Disp "tan : ",Ans
sin⁻¹(A**r)
Disp "sin⁻¹ : ",Ans
cos⁻¹(A**r)
Disp "cos⁻¹ : ",Ans
tan⁻¹(A**r)
Disp "tan⁻¹ : ",Ans
Stop

Lbl D
Input "Angle?",A
sin(A°)
Disp "sin : ",Ans
cos(A°)
Disp "cos : ",Ans
tan(A°)
Disp "tan : ",Ans
sin⁻¹(A°)
Disp "sin⁻¹ : ",Ans
cos⁻¹(A°)
Disp "cos⁻¹ : ",Ans
tan⁻¹(A°)
Disp "tan⁻¹ : ",Ans
Stop


Note : "**r" is the little r found in the angle menu on the 84s and ° is also found there
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement