
-----------------------------------
UraniumLobster
Wed Sep 12, 2007 9:31 am

How do you do square roots on turing? Im new so...
-----------------------------------
Just wanted to know how you use square roots/cube roots in turing.  I have to make a calculator which is simple I just don't know/remember how to square root a number.  I haven't programmed in over 3 years, and it has slipped my mind...

-----------------------------------
rdrake
Wed Sep 12, 2007 10:16 am

RE:How do you do square roots on turing? Im new so...
-----------------------------------
If I recall correctly, you might want to check out something along the lines of sqrt().  Also remember F10 is your friend.

-----------------------------------
Tony
Wed Sep 12, 2007 11:19 am

RE:How do you do square roots on turing? Im new so...
-----------------------------------
You could just use exponents

sqrt(x) = x**0.5

-----------------------------------
Clayton
Wed Sep 12, 2007 3:45 pm

RE:How do you do square roots on turing? Im new so...
-----------------------------------
Yes. Remember that x^1/n is the nth root of that number. So 8^1/3 will give you 2 (the cube root of 8) :)

-----------------------------------
Mazer
Wed Sep 12, 2007 5:48 pm

Re: RE:How do you do square roots on turing? Im new so...
-----------------------------------
If I recall correctly, you might want to check out something along the lines of sqrt().  Also remember F10 is your friend.
And on that note, so is F9 unless they changed something.

-----------------------------------
Clayton
Wed Sep 12, 2007 7:19 pm

RE:How do you do square roots on turing? Im new so...
-----------------------------------
F9 will give you the page for the keyword your cursor is blinking on, F10 will just open up the help manual.

-----------------------------------
Dabond
Wed Oct 17, 2007 10:21 am

Re: How do you do square roots on turing? Im new so...
-----------------------------------
"number"**"exponent"

-----------------------------------
Zampano
Wed Oct 17, 2007 10:25 am

Re: How do you do square roots on turing? Im new so...
-----------------------------------
On a related note, isn't it messed up that the squared number is inside the brackets uinstead of the number the be squared. It took me a long time to understand that.

-----------------------------------
Cervantes
Wed Oct 17, 2007 1:05 pm

RE:How do you do square roots on turing? Im new so...
-----------------------------------
Uh, Zampano, the square root function takes a number x and returns the number that, when squared, gives x. You might say sqrt(x^2) = x (ie. sqrt and f(x) = x^2 are inverse functions when defined on the positive reals). So it does make sense that the squared number is the parameter to sqrt.
Follow?
