Results 1 to 5 of 5

Math Help - Formula For Roots?

  1. #1
    Newbie
    Joined
    Dec 2005
    From
    Springdale
    Posts
    2

    Formula For Roots?

    Hey guys, I'm not sure if I put this in the right subtopic or not, so it can be moved if needed...

    Anyways, I just have a question about roots...

    When refering to let's say, the square root of 4, that can also be written as 4^(1/2). Ok, so I was just wondering if a calculator can actually do that, or does it do something else.

    In general, what goes on behind the scenes of a calculator when you take the square root or cube root of a number.

    Thanks!
    ~Stun
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Site Founder MathGuru's Avatar
    Joined
    Mar 2005
    From
    San Diego
    Posts
    478
    Awards
    1

    Cordic

    If you enter 4^(1/2) into a calculator it will give you the correct answer of 2. As far as what goes on behind the scenes in a calculator check this out:

    Calculators use what is called the CORDIC method to calculate square roots and such. you can probably find something in a google search about the CORDIC method but basically they have a list of stored values and an algorithm that uses these stored values to approximate the answers.

    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Dec 2005
    From
    Springdale
    Posts
    2
    Thanks for letting me know that. I've tried to look up some definitions for CORDIC, but pretty much all I found was a bunch of math-expert gable-de-gook. lol

    Can you possibly give me a quick definition for a newbie?

    Thanks!
    ~Stun
    Follow Math Help Forum on Facebook and Google+

  4. #4
    hpe
    hpe is offline
    Member hpe's Avatar
    Joined
    Apr 2005
    Posts
    158
    Quote Originally Posted by StunGunn
    In general, what goes on behind the scenes of a calculator when you take the square root or cube root of a number.
    The square root of a number x can be computed approximately to any precision as follows. I suspect that that's close to the way it's done in a calculator:

    Start with a guess a (a number near \sqrt{x}). Then compute b =\frac{1}{2}(a + \frac{x}{a}), c =\frac{1}{2}(b + \frac{x}{b}) , c =\frac{1}{2}(b + \frac{x}{b}) and so on. After a few steps, you will be near  \sqrt{x}. Note that you only have to be able to add and divide.

    There is a bit of theory that allows you to tell when to stop. It can be easly implemented in hardware. This is a special instance of the Newton-Raphson algorithm

    Example: To find \sqrt{23}, start with a = 5. Then b = 4.80000, c = 4.79583333333333, d = 4.79583152331306, e = 4.79583152331272 which is correct to all 15 digits. Works for any x and can be done also for all other roots.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by hpe
    The square root of a number x can be computed approximately to any precision as follows. I suspect that that's close to the way it's done in a calculator:

    Start with a guess a (a number near \sqrt{x}). Then compute b =\frac{1}{2}(a + \frac{x}{a}), c =\frac{1}{2}(b + \frac{x}{b}) , c =\frac{1}{2}(b + \frac{x}{b}) and so on. After a few steps, you will be near  \sqrt{x}. Note that you only have to be able to add and divide.

    There is a bit of theory that allows you to tell when to stop. It can be easly implemented in hardware. This is a special instance of the Newton-Raphson algorithm

    Example: To find \sqrt{23}, start with a = 5. Then b = 4.80000, c = 4.79583333333333, d = 4.79583152331306, e = 4.79583152331272 which is correct to all 15 digits. Works for any x and can be done also for all other roots.
    The actual square root algorithm implemented depends on the hardware that
    is available. Often division is costly and is avoided except for division by
    a power of the radix.

    It came as a surprise to me to find mention of the "long division"
    algorithm (the method that used to be taught in schools that used a tableau
    that resembled that used in long division) and methods using the result that
    the sum of odd integers is a square (and others too numerous to mention)
    when investigating machine implementation of the square root function.

    RonL
    Last edited by CaptainBlack; December 16th 2005 at 05:05 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: February 29th 2012, 02:46 PM
  2. using quadratic formula to find irrational roots
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: June 10th 2010, 12:20 AM
  3. Quadratic formula for complex roots
    Posted in the Algebra Forum
    Replies: 1
    Last Post: October 31st 2009, 12:04 PM
  4. Given 2 imaginary roots find other 2 roots
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: January 26th 2008, 10:24 PM
  5. Distance Formula with Roots
    Posted in the Algebra Forum
    Replies: 1
    Last Post: November 17th 2007, 03:55 PM

Search Tags


/mathhelpforum @mathhelpforum