question concerning Ans - 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: question concerning Ans (/thread-5729.html) |
question concerning Ans - ThomasA - 02-21-2016 07:29 PM 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 RE: question concerning Ans - Terje Vallestad - 02-21-2016 07:54 PM (02-21-2016 07:29 PM)ThomasA Wrote: What is going on there? Are there some restrictions with Ans? 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 RE: question concerning Ans - ThomasA - 02-22-2016 04:01 PM 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 RE: question concerning Ans - cyrille de brébisson - 02-23-2016 07:08 AM 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 |