HP Forums
Bug with Integers - 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: Bug with Integers (/thread-4549.html)

Pages: 1 2


RE: Bug with Integers - Joe Horn - 08-22-2015 02:04 AM

(08-21-2015 09:35 AM)wawa Wrote:  It is very confusing to know what is the "good way" to spell the appropriate function. As you can see on the screenshot below, there is no way to see what is the good answer :

[Image: modpb.png]

the wrong answer is obtained by typing "mod(7^23,143)" in lower case in CAS mode
the good answer is obtained by typing "(7^23) MOD 143" in upper case in CAS mode too

All this is very confusing.

Hint: What you typed is being obscured by Textbook Display mode, so just turn it off (Home Settings, page 2) to see a more "honest" display:

[Image: textbook_off.png]

I spend most of my Prime time with Textbook Display mode turned off, because the ugly truth is usually more useful than a pretty fiction.

EDIT: Also turn off the "Change apparent integers into exact integers" CAS option (page 1, end of line 3). This prevents real whole numbers from being silently coerced into integers. The presence of the decimal point in the display reveals when the result is an approximate real instead of an exact integer.


RE: Bug with Integers - Arno K - 08-22-2015 06:43 AM

(08-22-2015 02:04 AM)Joe Horn Wrote:  
(08-21-2015 09:35 AM)wawa Wrote:  It is very confusing to know what is the "good way" to spell the appropriate function. As you can see on the screenshot below, there is no way to see what is the good answer :

[Image: modpb.png]

the wrong answer is obtained by typing "mod(7^23,143)" in lower case in CAS mode
the good answer is obtained by typing "(7^23) MOD 143" in upper case in CAS mode too

All this is very confusing.

Hint: What you typed is being obscured by Textbook Display mode, so just turn it off (Home Settings, page 2) to see a more "honest" display:

[Image: textbook_off.png]

I spend most of my Prime time with Textbook Display mode turned off, because the ugly truth is usually more useful than a pretty fiction.

EDIT: Also turn off the "Change apparent integers into exact integers" CAS option (page 1, end of line 3). This prevents real whole numbers from being silently coerced into integers. The presence of the decimal point in the display reveals when the result is an approximate real instead of an exact integer.

Now the entries look very ugly, but you are right, they do not change, this is a good idea. I think I like textbook display more but must keep that in mind if functions do not provide awaited results.
Arno


RE: Bug with Integers - nlj - 08-23-2015 10:32 PM

(08-22-2015 02:04 AM)Joe Horn Wrote:  EDIT: Also turn off the "Change apparent integers into exact integers" CAS option (page 1, end of line 3). This prevents real whole numbers from being silently coerced into integers. The presence of the decimal point in the display reveals when the result is an approximate real instead of an exact integer.
Ah, great! Thanks Joe. That addresses my concern.