HP Forums
Hp 50g - "?" message and CAS bugs - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Hp 50g - "?" message and CAS bugs (/thread-15828.html)



Hp 50g - "?" message and CAS bugs - franz.b - 11-02-2020 04:53 PM

Hello to all,
it happened that with the exact CAS mode the result was "?" for example evaluating '0 ^ (1/2) ^ 2'. what is the meaning of this message?
it does not change by setting the underflow and overflow flags or with other CAS settings.
In approximate mode there are no strange results.

EDIT: setting the flag -3 the problem does not arise: is it a small bug?


RE: Hp 50g - "?" message - Carsen - 11-02-2020 07:00 PM

Hi

The meaning of '?' can be found in the 50g Advance User's Reference (AUR) on page 3-288. I'll give you a summary of what it means but I recommend reading it in its entirety in the manual.

Basically, the '?' means the answer is undefined. '?' represents a numerical result that cannot be obtained through the rules of arithmetic, according to the AUR.

I cannot tell you why '0^(1/2)^2' returns '?' because I'm still trying to figure that out myself.


RE: Hp 50g - "?" message - ttw - 11-03-2020 03:51 AM

I also get "?" with SIGN(0). It seems like this should be "0" rather than undermined.


RE: Hp 50g - "?" message - franz.b - 11-03-2020 07:23 AM

Another case:
100! work fine, '(1-1)^((1/2)^2)' is correctly 0, but '100!+(1-1)^((1/2)^2)' is '?'.
[Image: icon_confused.gif]


RE: Hp 50g - "?" message - Carsen - 11-03-2020 08:48 AM

(11-03-2020 03:51 AM)ttw Wrote:  I also get "?" with SIGN(0). It seems like this should be "0" rather than undermined.

On page 3-223 of the AUR, it describes the command SIGN. It states that in exact mode, using SIGN on 0 will be returned as undefined ('?'). In approximate mode, using SIGN on 0 will return 0.

In short, this is by design. Although, it does not answer why it is designed this way.


RE: Hp 50g - "?" message - franz.b - 11-03-2020 10:45 AM

I suspect there are obvious bugs in the CAS ...


RE: Hp 50g - "?" message - Albert Chan - 11-03-2020 04:30 PM

(11-03-2020 08:48 AM)Carsen Wrote:  In short, this is by design. Although, it does not answer why it is designed this way.

With sgn(x) = x/abs(x), symbolic manipulations are simpler.

Hp50g> 'X+SIN(X)'
Hp50g> SIGN             → (X+SIN(X)) / |X+SIN(X)|

Adding sgn(0)=0 rule, we get this:

IFTE(X+SIN(X) , (X+SIN(X)) / |X+SIN(X)| , 0)


RE: Hp 50g - "?" message - ttw - 11-03-2020 09:11 PM

(11-03-2020 04:30 PM)Albert Chan Wrote:  
(11-03-2020 08:48 AM)Carsen Wrote:  In short, this is by design. Although, it does not answer why it is designed this way.

With sgn(x) = x/abs(x), symbolic manipulations are simpler.

Hp50g> 'X+SIN(X)'
Hp50g> SIGN             → (X+SIN(X)) / |X+SIN(X)|

Adding sgn(0)=0 rule, we get this:

IFTE(X+SIN(X) , (X+SIN(X)) / |X+SIN(X)| , 0)

The problem arises in the context of integer computations though. It means an extra test for every comparison.