Results 1 to 7 of 7

Math Help - decimal places

  1. #1
    Junior Member
    Joined
    May 2010
    Posts
    39

    decimal places

    suppose iam to solve cos x = 2x to 5 decimal places using newton raphson method how many iterations do i need to perform?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Mar 2007
    Posts
    206
    Awards
    1
    I imagine that would depend on where your initial guess is - I am sure CB will give a better answer then that. Out of curiosity why do you need to know how many iterations to perform? Are you attempting to implement the function with a for loop rather then a while/do loop?

    Regards Elbarto
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    May 2010
    Posts
    39
    yeah iam gonna implement using a for loop and ask the user to input the no of correct decimal places needed. so how am i gonna determine the no of correct decimal places at the current iteration?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by ilikec View Post
    yeah iam gonna implement using a for loop and ask the user to input the no of correct decimal places needed. so how am i gonna determine the no of correct decimal places at the current iteration?
    What you do is include a condition that is tested after each iteration. Once the condition is true the program ends. You should think about what condition will end the program once you have achieved 5 decimal places of accuracy (Hint: Once you are correct to 5 decimal place, the fifth decimal place will no longer change).
    Last edited by mr fantastic; July 10th 2010 at 02:18 AM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    May 2010
    Posts
    39
    i got it mr fantasitic. But isn't there a equation that i can use or does theory say that after say n iterations you get x no of decimal places correct?
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by ilikec View Post
    i got it mr fantasitic. But isn't there a equation that i can use or does theory say that after say n iterations you get x no of decimal places correct?
    Google
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor Also sprach Zarathustra's Avatar
    Joined
    Dec 2009
    From
    Russia
    Posts
    1,506
    Thanks
    1
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Finding the last two decimal places.....
    Posted in the Number Theory Forum
    Replies: 0
    Last Post: June 5th 2011, 10:46 AM
  2. Replies: 8
    Last Post: January 8th 2011, 11:22 PM
  3. Rounding to three decimal places
    Posted in the Math Topics Forum
    Replies: 2
    Last Post: August 24th 2010, 04:57 PM
  4. Express y correct to 2 decimal places
    Posted in the Algebra Forum
    Replies: 2
    Last Post: April 22nd 2009, 10:17 PM
  5. Decimal Places
    Posted in the Algebra Forum
    Replies: 4
    Last Post: April 1st 2008, 02:12 PM

Search Tags


/mathhelpforum @mathhelpforum