HP71B Integral Questions
|
02-05-2020, 06:20 PM
Post: #8
|
|||
|
|||
RE: HP71B Integral Questions
I ran the same tests on the HP75 Math ROM, here is the program adapted from Albert's code for the 75C:
10 A=6371000 @ B=9.46073047258E15 @ C=3.98589196E17 @ A1=A-1 20 DEF FNA(X) 22 N=N+1 @ FNA=C/EXP(X) 25 END DEF 30 DEF FNB(X) 32 N=N+1 @ X=EXP(X) @ FNB=C*X/(X+A1)^2 35 END DEF 40 INPUT "P=?";P 50 T=TIME @ N=0 @ I=INTEGRAL(LOG(A),LOG(B),P,FNA(X)) 60 DISP "IA(";N;") =";ROUND(I,0),IBOUND,TIME-T;"SEC" 70 ! T=TIME @ N=0 @ I=INTEGRAL(0,LOG(B-A1),P,FNB(X)) 80 ! DISP "IB(";N;") =";ROUND(I,0),IBOUND,TIME-T;"SEC" The results are a bit different from the HP71 outputs: P=?2e-2 IA( 63 ) = 62563132323 422758135.629 .11 SEC P=?1e-3 IA( 127 ) = 62563050559 21501195.6588 .22 SEC P=?1e-4 IA( 255 ) = 62563050656 2072473.90909 .495 SEC P=?1e-5 IA( 255 ) = 62563050656 207247.390909 .494 SEC P=?1e-6 IA( 511 ) = 62563050656 20718.6780627 .989 SEC For the same target accuracy P, the HP75 uses more samples: with P=1E-6, the HP71 uses only 127 samples, and the HP75 511 samples. Comparing with the Excel simulations from Albert for the first two results: Code: Intervals Richardson Extrapolations So it turns out that the HP71 and HP75 INTEGRAL are based on the same algorithm but use different criteria for the choice of the number of samples and returned value. The IBOUND value is still not clear for me, both on the HP71 and HP75. With same number of samples and same extrapolation, why is the IBOUND value different and depends on the user-supplied target accuracy P? For instance in the cases above, IBOUND is exactly divided by 10 when P is changed from 1E-4 to 1E-5 - same samples, same extrapolation, same INTEGRAL result. J-F |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)