HP Forums
What do you expect from 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: What do you expect from Ans? (/thread-14090.html)



What do you expect from Ans? - pinkman - 12-02-2019 11:18 PM

Hello,
What do you think Ans should return?

In CAS:
Code:

3+4               7

In Home:
Code:

3*4              12
isprime(Ans)      1

A bit disappointing, no?


RE: What do you expect from Ans? - Tim Wessman - 12-03-2019 12:56 AM

What was the last thing you did on the CAS screen? I bet it was a prime number....


The problem is the CAS really can't be integrated like you want because there is severe incompatibility in many places with a "normal" calculator. Ans actually has 3 locations, cas screen, home, and RPN. They are all a bit different...


RE: What do you expect from Ans? - pinkman - 12-03-2019 02:57 AM

Yes I clearly understand that inside a CAS function Ans is the one of the CAS, and that the reason of this is the difficulty of integration between two universes.
But one can expect the CAS command, executed in the Home context, receives all the data of this context, Ans included.
In fact the syntax is important: it is not executed in the Home context, it is executed from the Home context.


RE: What do you expect from Ans? - toml_12953 - 12-03-2019 04:56 AM

(12-03-2019 02:57 AM)pinkman Wrote:  Yes I clearly understand that inside a CAS function Ans is the one of the CAS, and that the reason of this is the difficulty of integration between two universes.
But one can expect the CAS command, executed in the Home context, receives all the data of this context, Ans included.
In fact the syntax is important: it is not executed in the Home context, it is executed from the Home context.

Still, isprime is a CAS function so it uses Ans from the CAS environment. Where you executed it from is irrelevant to the calculator.


RE: What do you expect from Ans? - Tim Wessman - 12-03-2019 05:20 AM

We do not like it either.... there just is not much that can be done unfortunately. Sad


RE: What do you expect from Ans? - Stevetuc - 12-03-2019 07:47 AM

(12-02-2019 11:18 PM)pinkman Wrote:  Hello,
What do you think Ans should return?

In CAS:
Code:

3+4               7

In Home:
Code:

3*4              12
isprime(Ans)      1

A bit disappointing, no?

And in Home:
Code:

3*4              12
ISPRIME(Ans)      1
But this time a console opens
[attachment=7869]
A strange frankenstein result, but does give both results
home Ans▶ console
Cas Ans▶ home