Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Calculation Of Roots

  • 13-05-2006 2:03pm
    #1
    Closed Accounts Posts: 6,151 ✭✭✭


    Purely out of curiousity, i was just wondering if anyone knows how exactly Caluclators and computers calculate roots of numbers?
    Is it simply a case of a Binary search or is there more a more efficient method to do the job?


Comments

  • Closed Accounts Posts: 1,475 ✭✭✭Son Goku


    Call x the square root.

    Lets say x^2 = b.
    x can be found using new_x = (1/2)(guess_x + b/(guess_x)).
    And then you perform this process over and over again.

    So let's say we want to find the square root of 26.
    (Whose root is 5.099.........)

    x^2 = 26, so b = 26.

    Our first guess will be x = 1, so

    new_x = (1/2)(1 + 26/1) = 27/2 = 13.5

    13.5 becomes our new guess_x.
    So, again:
    new_x = (1/2)(13.5 + 26/13.5) = 7.7129........

    Again:
    new_x = (1/2)(7.7129 + 26/7.7129) = 5.54193..........

    So you get closer and closer to the root.

    A calculator does this process about 200 times to get a square root for you.


  • Registered Users, Registered Users 2 Posts: 3,608 ✭✭✭breadmonkey


    On a barely related note, how do you prove the formula for the roots of a quadratic equation? I knew it many moons ago but have forgotten.


  • Registered Users, Registered Users 2 Posts: 1,080 ✭✭✭Crumbs


    On a barely related note, how do you prove the formula for the roots of a quadratic equation? I knew it many moons ago but have forgotten.
    Start with ax² + bx + c = 0

    Divide across by a (where a≠0) and then complete the square on the first two terms.

    The rest is left as an exercise to the reader.


  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    Son Goku wrote:
    Call x the square root.

    Lets say x^2 = b.
    x can be found using new_x = (1/2)(guess_x + b/(guess_x)).
    And then you perform this process over and over again.

    So let's say we want to find the square root of 26.
    (Whose root is 5.099.........)

    x^2 = 26, so b = 26.

    Our first guess will be x = 1, so

    new_x = (1/2)(1 + 26/1) = 27/2 = 13.5

    13.5 becomes our new guess_x.
    So, again:
    new_x = (1/2)(13.5 + 26/13.5) = 7.7129........

    Again:
    new_x = (1/2)(7.7129 + 26/7.7129) = 5.54193..........

    So you get closer and closer to the root.

    A calculator does this process about 200 times to get a square root for you.
    Ahhhh makes sense to see it with figures, thanks a mil


Advertisement