Recent content by ncp1044

  1. N

    What is the Pseudo Code for a Riemann Sum Calculation?

    Perhaps I should buy a book on it. It sounds like a pretty dense topic. Thanks for pointing me in the right direction.
  2. N

    What is the Pseudo Code for a Riemann Sum Calculation?

    Can you expound on "If you have control for the threads..."? I can't say I know anything about parallel processing either...
  3. N

    What is the Pseudo Code for a Riemann Sum Calculation?

    To Mathmate: Thanks! That's much better, and it's all accurate. And I'm using Force2.0, a freebie that I found on download.com. To Hurkyl: The reason for the error makes sense now. And thanks for the heads-up, I feel stupid now haha. rIEmann. Edit: What would it take to do this in parallel?
  4. N

    What is the Pseudo Code for a Riemann Sum Calculation?

    Here is my code. It seems to work except two things. When the number of subintervals is around 2,000,000 or greater, it starts to slowly diverge from pi. Also, at 15,000,000 the sum equals 4, and at around 17,000,000 it doesn't return an answer. I'm trying to use 40,000,000 subintervals and...
  5. N

    What is the Pseudo Code for a Riemann Sum Calculation?

    So I'm writing a program to do a riemann sum. The final answer should be Pi. My function: f(x) = 4/(1+x^2) a = 0 b = 1 n = 40,000,000 For a riemann sum, delta x = (b-a)/n so (1-0)/40,000,000 = 1/40,000,000. Then the riemann sum looks like...
  6. N

    Comp Sci Calculating pi using Riemann Sum and Fortran77

    I haven't even tried to write the program yet because I don't know anything about programming. I have yet to take a programming course.
  7. N

    Comp Sci Calculating pi using Riemann Sum and Fortran77

    I understand the calculus part of the problem; I just need help with the programming part. I can do the differentiation and I know how to do a Riemann Sum by hand, assuming that the number of intervals is small. I'm no good at programming so if anyone knows, some help would be appreciated.
  8. N

    Comp Sci Calculating pi using Riemann Sum and Fortran77

    My assignment: Solve for pi using a Riemann Sum with n= 40,000,000. The function is the antiderivate of 4/(1+x^2) dx. The bounds are from 0 to 1. Solving this gives you pi. Anyone know how to do this? Preferably with fortran77?
Back
Top