Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Roots

Name: Anonymous 2007-07-01 9:02 ID:IUCDBDQ7

How do I calculate roots of natural numbers in memory (or on paper)?

Name: Anonymous 2007-07-01 9:57 ID:f1gUuwqH

perl -e "print number ** (1 / root)"

The root is calculted in memory.

Name: Anonymous 2007-07-01 11:35 ID:Uq9zdK6i

Calculator?

It's a pretty useless talent to have.

You can say to the nearest .5 pretty easily, but past that it'd take you quite a while unless it was a particularly nice number.

Name: Anonymous 2007-07-01 12:34 ID:eGXr4Z1A

i think he's asking for an algorithm, or how do calculators do it?

Name: Anonymous 2007-07-01 14:55 ID:IUCDBDQ7

Yeah, an algoritm but it would be nice if I could calculate it by myself.

Name: Anonymous 2007-07-01 15:17 ID:oJcgIiTx

Name: Anonymous 2007-07-01 15:18 ID:8Wyozx7o

Working out each decimal place isn't too hard. For instance, you can show the square root of 2 is between 1 and 2 by considering 1^2 and 2^2.

Similarly, it is between 1.4 and 1.5 because 1.4^2 = 1.96 and 1.5^2 = 2.25. Easy enough to do in your head, I did it in mine just now. (e.g. 1.4^2 is done by squaring 14 then adding a decimal point in the right place.)

And so on, though after a bit you'll have to start working on paper. That's the most general algorithm I can think of.

Name: Anonymous 2007-07-01 15:30 ID:U2OjrazX

1. pick a number and square it. is it the number you're trying to find the root of? then you've finished
2. else, if it's lower, pick a higher number, if it's higher, pick a lower number
3. goto step 1

Name: Anonymous 2007-07-03 20:14 ID:yIZEkb9N

to find the square root of X, start with a guess G.  the loop step is:
   G = avg(N/G,G)
you can convince yourself that this converges (quickly)

Name: Anonymous 2007-07-03 21:00 ID:Heaven

>>9
I hope that N is supposed to be an X.

Name: Anonymous 2009-03-18 3:13

I feel the need, the need for weed!

Marijuana MUST be legalized.

Don't change these.
Name: Email:
Entire Thread Thread List