HP Forums
HOME and CAS unexpected behavior - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: HOME and CAS unexpected behavior (/thread-18999.html)



HOME and CAS unexpected behavior - mmadurga - 10-21-2022 08:35 PM

Hi all,

One of my students mentioned to me that he was getting zero when calculating the result of a finite integral in HOME.

I already had the solutionI calculated using a table of integrals so I could easily evaluate it in both HOME and CAS, and, lo and behold, I get 0.000E0 in HOME, 7.1054E-15 in CAS.

The expression to evaluate is

EXP(-2r/a) * (-2r^2/a^2 - 2r/a - 1) + 1

with r=0.877E-15 and a =5.290E-11

Any idea where is this behavior coming from?[/code]


RE: HOME and CAS unexpected behavior - rawi - 10-22-2022 06:04 PM

What are the lower and upper limit of the integral? And what is the variable to integrate?


RE: HOME and CAS unexpected behavior - Albert Chan - 10-22-2022 07:13 PM

(10-21-2022 08:35 PM)mmadurga Wrote:  I already had the solutionI calculated using a table of integrals so I could easily evaluate it in both HOME and CAS, and, lo and behold, I get 0.000E0 in HOME, 7.1054E-15 in CAS.

Since you use table of integrals, I assumed it has nothing to do with integration routine.

It may be due to massive cancellations, for F(hi) - F(lo)
HOME has 12 decimals precisions, but CAS has more (53-5 = 48-bits, or about 14+ decimals)