
-----------------------------------
chrispaks
Thu Apr 14, 2005 5:30 pm

SinCosTan (-1)
-----------------------------------
Ok we have the codes sin, sind, cos, cosd, tan, tand...etc...

If we have angle 50 and use cos (50) we will get 0.964966

What is the command (if there is any) to convert the 0.964966 into an angle (interger between 1-90)?

Note: I dont want to enter a ton of

if (variable) = 0.1028428
then
put "The degree is ##"

Instead, can Turing do the calculations for me?

-----------------------------------
Martin
Thu Apr 14, 2005 6:19 pm


-----------------------------------
Sure it can.

Your answer is in radians. There are 2 * pi radians in a circle. There are also 360 degrees in a circle.

This gives us that there are 360 degrees / 2 * pi radians

Now, we have how many radians there are, and we want to convert to degrees. Let the number of radians we have be x. We want to solve for how many degrees x is, which we'll denote by y.

y degrees / x radians = 360 degrees / 2 * pi radians.

Multiplying both sides by x we get:

y = (360 * x) / (2 * pi)

-----------------------------------
Andy
Thu Apr 14, 2005 7:12 pm


-----------------------------------
err martin? what are ut alkin about?? hes looking for an inverse function.... yea they do exist.. its called arcsin arccos and arctan arc stands for arc length, meaning its in radians

-----------------------------------
lordofall
Thu Apr 14, 2005 9:20 pm


-----------------------------------
i wish somebody told me this like last week cause my group messed up hard at a compsci contest since we didn't know about arctan :@ (ya we didn't finish math yet lol)

-----------------------------------
Martin
Fri Apr 15, 2005 6:08 am


-----------------------------------
err martin? what are ut alkin about?? hes looking for an inverse function.... yea they do exist.. its called arcsin arccos and arctan arc stands for arc length, meaning its in radians

Ohh...right....

-----------------------------------
chrispaks
Fri Apr 15, 2005 3:01 pm


-----------------------------------
Sure it can.

Your answer is in radians. There are 2 * pi radians in a circle. There are also 360 degrees in a circle.

This gives us that there are 360 degrees / 2 * pi radians

Now, we have how many radians there are, and we want to convert to degrees. Let the number of radians we have be x. We want to solve for how many degrees x is, which we'll denote by y.

y degrees / x radians = 360 degrees / 2 * pi radians.

Multiplying both sides by x we get:

y = (360 * x) / (2 * pi)

so if you had to put that in a code for me to copy and paste, which way would I put it in?


var y, x : real
const pi : 3.14 (forget if you have to have var name or not as in real)
get x
y = (360 * x) / (2 * pi)
put y

-----------------------------------
Andy
Fri Apr 15, 2005 3:31 pm


-----------------------------------
omg read the posts you idiot

-----------------------------------
Martin
Sat Apr 16, 2005 5:04 am


-----------------------------------
Umm, Andy...read the first post again...

-----------------------------------
Martin
Sat Apr 16, 2005 5:06 am


-----------------------------------
Sure it can.

Your answer is in radians. There are 2 * pi radians in a circle. There are also 360 degrees in a circle.

This gives us that there are 360 degrees / 2 * pi radians

Now, we have how many radians there are, and we want to convert to degrees. Let the number of radians we have be x. We want to solve for how many degrees x is, which we'll denote by y.

y degrees / x radians = 360 degrees / 2 * pi radians.

Multiplying both sides by x we get:

y = (360 * x) / (2 * pi)

so if you had to put that in a code for me to copy and paste, which way would I put it in?


var y, x : real
const pi : 3.14 (forget if you have to have var name or not as in real)
get x
y = (360 * x) / (2 * pi)
put y

Yep. :)
