Results 1 to 16 of 16

Thread: square ROOT

  1. #1

    Thread Starter
    Hyperactive Member made_of_asp's Avatar
    Join Date
    Jul 2001
    Location
    123 Fake Street
    Posts
    394

    square ROOT

    Hello,

    Is there some sort of a formula to calculate square root ( with your brain . I dont know how to do log or E
    VS.NET 2003

    Need to email me?

  2. #2
    sql_lall
    Guest
    Yes, there is (though i don't have it on me right now). If you search for one you should be able to find it. If not, then all you have to do to get one to 2 dec. pl. is multiply it by 100^2, find the integer square root of this, then divide it by 100.
    (This can be done for more than 2 dec. pl. as well.)

    I'm 15 so i won't

  3. #3
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    If you are a good guesser and can do simple arithmetic, you can do square root.

    Make a guess, divide the guess into the number, use the average of the guess and the quotient as the next guess. I will illustrate by giving an example.

    Suppose you did not know that the square root of 100 is 10, and wanted to calculate it. You are a bad guesser and decide that 20 is a reasonable guess.

    100/20 = 5
    Average(5, 20) = 12.5

    100/12.5 = 8
    Average(8, 12.5) = 10.25 (We are getting closer)

    100/10.25 = 9.756 097 561
    Average(9.756 097 561, 10.25) = 10.003 048 751

    100/10.003 048 751 = 9.996 952 178
    Average(9.996 952 178, 10.003 048 751) = 10.000 000 465

    Keep going until you think you are close enough.

    Note that as you get closer, the guesses do not change much. This is how you know you are close.

    There is a method which is a bit like long division, but I find the above easier. I make good first guesses.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  4. #4
    Fanatic Member twanvl's Avatar
    Join Date
    Dec 2001
    Posts
    771
    I think dividing is really hard without a calculator, I use this method:

    try to find sqr(2):

    guess 1: 1.5
    1.5 ^ 2 = 1*1.5 + .5*1.5 = 2.25
    That is to high

    guess 2: 1.4
    1.4^2 = 1.5^2 - 2*1.5*(1.5-1.4) + (1.5-1.4)^2 = 2.25 - 0.3 + 0.01 = 1.96 (I use this method, because it's much easier then recalculating the entire thing)

    1.96 is to low, so the answer is between 1.4 and 1.5

    guess 3: 1.45
    1.45^2 = 1.4^2 + 2*1.4*0.05 + 0.05^2 = 1.96 + 0.14 + .0025 = 2.1025

    etc.

    The formulas I use are:
    (A+B)^2 = A^2 + 2*A*B + B^2
    and
    (A-B)^2 = A^2 - 2*A*B + B^2

  5. #5
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Twanvl: Note how fast the guess divide and average method converges. See previous post.

    That method got 8 digits of precision in 4 iterations, starting with a terrible first guess (20 as guess for Square Root 100).

    The method you posted will take a lot more work.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  6. #6
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    Lighten up Guv, it was his seventh post!
    There are 10 types of people in the world - those that understand binary, and those that don't.

  7. #7
    Frenzied Member nishantp's Avatar
    Join Date
    Jan 2001
    Location
    Where you least expect me to be
    Posts
    1,375
    Originally posted by Guv
    If you are a good guesser and can do simple arithmetic, you can do square root.

    Make a guess, divide the guess into the number, use the average of the guess and the quotient as the next guess. I will illustrate by giving an example.

    Suppose you did not know that the square root of 100 is 10, and wanted to calculate it. You are a bad guesser and decide that 20 is a reasonable guess.

    100/20 = 5
    Average(5, 20) = 12.5

    100/12.5 = 8
    Average(8, 12.5) = 10.25 (We are getting closer)

    100/10.25 = 9.756 097 561
    Average(9.756 097 561, 10.25) = 10.003 048 751

    100/10.003 048 751 = 9.996 952 178
    Average(9.996 952 178, 10.003 048 751) = 10.000 000 465

    Keep going until you think you are close enough.

    Note that as you get closer, the guesses do not change much. This is how you know you are close.

    There is a method which is a bit like long division, but I find the above easier. I make good first guesses.
    Guv, Would i be right in saying that with that method, you would get infinitesimaly close to the answer, but never reach it exactly?
    You just proved that sig advertisements work.

  8. #8
    Fanatic Member riis's Avatar
    Join Date
    Nov 2001
    Posts
    551
    Guv, Would i be right in saying that with that method, you would get infinitesimaly close to the answer, but never reach it exactly?
    Nishantp, isn't that the case with most square roots? Even if you know sqrt(2) in 300 decimals, you still don't have the exact value. So, I see no problem with Guv's method.

  9. #9
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Nishantp: Right you are. You will never get an exact square root.

    The remark by Riis is pertinent.

    If you try the method on exact sqaures like 1.44, 4, 9, 256, et cetera, you might guess that you know what the exact root is and stop the process.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  10. #10
    New Member
    Join Date
    Feb 2002
    Location
    South Wales
    Posts
    11

    Re: square ROOT

    There are loads of ways to do this... and quite a few formula too!

    There are not really any that stick out as being the easiest, but I suppose that doesn't matter anyway... we all have different ways of doing something!

    Well, this is the point where I tell you how to do it - but I'm not going to!

    It's quite easy to understand and do, but a complete pain in the ass to describe. It took me a while to find somewhere on the Interent that already describes this (save me the trouble of writing my own explaination!), but I found this:

    http://mathforum.org/dr.math/tocs/sq...ot.middle.html

    There are quite a few examples.
    For some more examples (or ones of a higher/lower calibre of maths) try these links:

    http://mathforum.org/dr.math/tocs/squareroot.high.html
    http://mathforum.org/dr.math/tocs/squareroot.elem.html

    Hope this helps.

    Regards,
    Lloyd

  11. #11

    Thread Starter
    Hyperactive Member made_of_asp's Avatar
    Join Date
    Jul 2001
    Location
    123 Fake Street
    Posts
    394
    Thanks everyone for your answers

    There is also this forumula if anyone solves it???


    Exp(Log(x) / 2)

    meaning...

    2.71828182845905 ^ (Log(x) / 2)
    Last edited by made_of_asp; Feb 17th, 2002 at 08:07 PM.
    VS.NET 2003

    Need to email me?

  12. #12
    Hyperactive Member thinktank2's Avatar
    Join Date
    Nov 2001
    Location
    Arctic
    Posts
    272
    e(LogeA) = A

    and [Log A]/2 = 1/2* Log A = Log A1/2


    Therefore e((Logex)/2) = e(Logex1/2) = x1/2

  13. #13
    sql_lall
    Guest

    Thumbs up Yes, But...

    That's right , but only one slight technical hitch.
    You have written log(x), which generally suggests log 10(x).
    If you want to make sure you are using the natural logarithm -e- then put ln(x). This always means log e(x).

    N.B. Sorry, i don't know how to subscript

    The equation corrected:

    x ^1/2 =
    e/2*ln(x)

    I'm not sure, but does
    x ^ 1/y =
    e/y * ln(x)

    Maybe you can even say:
    x ^ y/z =
    e*y/z*ln(x) =
    10*y/z*log(x)

    Though I haven't checked these last two.

  14. #14
    Hyperactive Member thinktank2's Avatar
    Join Date
    Nov 2001
    Location
    Arctic
    Posts
    272
    Originally posted by sql_lall
    The equation corrected:

    x ^1/2 = e/2*ln(x)

    I'm not sure, but does
    x ^ 1/y = e/y * ln(x)

    Maybe you can even say:
    x ^ y/z = e*y/z*ln(x) = 10*y/z*log(x)

    Though I haven't checked these last two.
    Your equations are wrong...

    Start from here ..

    ln[x^(1/2)] = (1/2) * ln[x]

    Raising both sides to the power of e

    e^( ln[x^(1/2)] ) = e^( (1/2) * ln[x] )

    Which means

    x^(1/2) = e^( (1/2) * ln[x] ) --------------Eq (1)


    Similarly,

    log10[x^(1/2)] = (1/2) * log10[x]

    Raising both sides to the power of 10

    10^( log10[x^(1/2)] ) = 10^( (1/2) * log10[x] )

    Which means,

    x^(1/2) = 10^( (1/2) * log10[x] ) --------Eq (2)

    From Eq1 and Eq 2 you should see that...

    x^(1/y) = e^( (1/y) * ln[x] ) = 10^( (1/y) * log10[x])

    and

    x^(y/z) = e^( (y/z) * ln[x] ) = 10^( (y/z) * log10[x])

  15. #15
    sql_lall
    Guest

    Wink Sorry 'bout that!

    Yeah, that's what i meant. Don;t know why i used times instead of ^ though. Maybe just tired

  16. #16

    newtons method or continued fractions

    There are quite a few ways to figure out a root. The most popular that I can think of is newton's method that is performed on :
    Say you want the sqrt(7). You know that y = 7-x^2 has roots at plus or minus sqrt(7). Use newton's method to find those roots and BAM you've got your answer

    Continued fractions from number theory is another - more intersting way

    later
    I have a silent visitor.
    I killed him with my hands, you know.
    I killed him with my hands...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width