Recent content by ncp1044
-
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.- ncp1044
- Post #10
- Forum: Programming and Computer Science
-
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...- ncp1044
- Post #8
- Forum: Programming and Computer Science
-
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?- ncp1044
- Post #6
- Forum: Programming and Computer Science
-
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...- ncp1044
- Post #3
- Forum: Programming and Computer Science
-
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...- ncp1044
- Thread
- Code Sum
- Replies: 9
- Forum: Programming and Computer Science
-
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.- ncp1044
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
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.- ncp1044
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
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?- ncp1044
- Thread
- Fortran77 Riemann Riemann sum Sum
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help