HP Forums

Full Version: question concerning Ans
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I have an issue with "Ans":
Example:
nextprime(1000000) ENTER
returns 1000003 (which might be correct, I don't know for sure)
but when entering now
nextprime(Ans) ENTER
I get 2 as a result.
Entering directly
nextprime(1000003) ENTER
I get 1000033, which seems plausible.
What is going on there? Are there some restrictions with Ans?
Thomas
(02-21-2016 07:29 PM)ThomasA Wrote: [ -> ]What is going on there? Are there some restrictions with Ans?
Thomas

Hi

Thesis is most likely to do with the two different Ans, one for CAS and one for Home. Since nextprime() is a CAS function it picks up the Ans from CAS, which is the result of some calculations you have done there earlier. More information about this behaviour is in this link

Hope this helps

Cheers, Terje
Thanks, Terje!

I repeated my calculation within CAS - the problem was gone!
So what I learned by this: do all CAS-Calculations in CAS.

Thomas
Hello,

yes, as a general rule, do all CAS calculations in CAS and all numerical calculations in home.

We have invested a considerable amount of work in trying to make Home/Cas interactions as seamless as possible to allow home/cas co-habitation, but in some cases, like this one, it does come back to bite us.

Cyrille
Reference URL's