- Inquiring About Small Calculations
- 10 Dec 2014 10:17:23 pm
- Last edited by Electromagnet8 on 10 Dec 2014 10:38:01 pm; edited 3 times in total
While creating a program to calculate Riemann Sums for left, right, and midpoint rectangles, I decided to find the limitations of my program. While running the program, I noticed that there were some values that deviated from the average. I decided to investigate this.
I ran this program until the calculator's memory limited the number of times it could run. It got up to θ=441, which means that there were 441 values in all four lists. Y₁ is defined as 1/X.
Code:
L₁ is the data for LeftRAM, L₂ is the data for RightRAM, L₃ is the data for MidpointRAM. L₄ is the data for the number of subdivisions.
After I exported the lists into a statistical program, I graphed the data to see any trends. To my surprise, there were a couple of trends in these graphs.
Left Riemann Sum
Code:
Right Riemann Sum
Code:
Midpoint Riemann Sum
Code:
All Riemann Sums
The variation is small but noticable. There might be a value that decreases 0.0005 from the previous value but go right back up 0.0005.
I was using a TI-84+SE 2.55 MP OS on Wabbitemu at 400% speed to run the program. It gets somewhat slow at the end.
Is this due to the error of floating point numbers or some other phenomenon? What else could explain these trends?
I ran this program until the calculator's memory limited the number of times it could run. It got up to θ=441, which means that there were 441 values in all four lists. Y₁ is defined as 1/X.
Code:
1→A:2→B
For(θ,1,500
1/θ→N
Nsum(Y₁(seq(X,X,A,B-N,N→L₁(θ
Nsum(Y₁(seq(X,X,A+N,B,N→L₂(θ
Nsum(Y₁(seq(X,X,A+.5N,B-.5N,N→L₃(θ
θ→L₄(θ
Output(1,1,θ
End
L₁ is the data for LeftRAM, L₂ is the data for RightRAM, L₃ is the data for MidpointRAM. L₄ is the data for the number of subdivisions.
After I exported the lists into a statistical program, I graphed the data to see any trends. To my surprise, there were a couple of trends in these graphs.
Left Riemann Sum
Code:
Nsum(Y₁(seq(X,X,A,B-N,N
Right Riemann Sum
Code:
Nsum(Y₁(seq(X,X,A+N,B,N
Midpoint Riemann Sum
Code:
Nsum(Y₁(seq(X,X,A+.5N,B-.5N,N
All Riemann Sums
The variation is small but noticable. There might be a value that decreases 0.0005 from the previous value but go right back up 0.0005.
I was using a TI-84+SE 2.55 MP OS on Wabbitemu at 400% speed to run the program. It gets somewhat slow at the end.
Is this due to the error of floating point numbers or some other phenomenon? What else could explain these trends?