HP Forums
Binay Integer in CAS - 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: Binay Integer in CAS (/thread-1577.html)



Binay Integer in CAS - Alberto Candel - 06-09-2014 05:03 PM

Hi,

A couple of things that I was hoping to have seen fixed in the most recent (they are RED inked in the HP Prime user guide).

1) Are there any plans to include Binary as a choice for "base for integers" in CAS?
2) In case, entries like B->R(#101b) display B->R(5), so the binary expression is lost. I cannot find a justification for that behavior...

Thank you


RE: Binay Integer in CAS - Tim Wessman - 06-09-2014 05:07 PM

The concept of integers really is not compatible between home/cas as they are really used for completely different purposes. However, when I'd asked about that early on Bernard said that there had been no interest expressed by anyone in having that in the CAS. Don't know if anything has changed since then.


RE: Binay Integer in CAS - Alberto Candel - 06-09-2014 05:17 PM

(06-09-2014 05:07 PM)Tim Wessman Wrote:  The concept of integers really is not compatible between home/cas as they are really used for completely different purposes. However, when I'd asked about that early on Bernard said that there had been no interest expressed by anyone in having that in the CAS. Don't know if anything has changed since then.

Ah OK. Thanks. I asked because I tend to work in CAS rather than in Home.


RE: Binay Integer in CAS - parisse - 06-10-2014 05:50 AM

There should be support for integer in base 2 in input with the standard 0b prefix, e.g. 0b110 for 6 or wit convert(ist,base,2). Displaying in base 2 should be done with convert(integer,base,2), bits are in reverse order with convert (maple convention).


RE: Binay Integer in CAS - Alberto Candel - 06-10-2014 06:12 PM

(06-10-2014 05:50 AM)parisse Wrote:  There should be support for integer in base 2 in input with the standard 0b prefix, e.g. 0b110 for 6 or wit convert(ist,base,2). Displaying in base 2 should be done with convert(integer,base,2), bits are in reverse order with convert (maple convention).

Yes, that works in CAS. Typing 0b110 on the CAS command line displays 6, both as input as output. But, how do I keep my input 0b110 on the display line as such?

Also, the CONVERT function seems to be doing something else. In particular, it only allows for 2 arguments, as in CONVERT(value_1,value_2). Maybe I am looking at something else...

Thank you


RE: Binay Integer in CAS - parisse - 06-10-2014 07:19 PM

Try convert lowercase not uppercase. CAS functions are lowercase.


RE: Binay Integer in CAS - Alberto Candel - 06-10-2014 09:40 PM

(06-10-2014 07:19 PM)parisse Wrote:  Try convert lowercase not uppercase. CAS functions are lowercase.

OK, thanks, it works.
But "convert" reverts to CONVERT in CAS (which is not the CONVERT in Tool Box I think)
Input:

convert(17, base, 2)

result:

CONVERT(CONVERT(19,base),2) [1 1 0 0 1]

and copy of this (left) to command line writes

convert(19,base,2)


RE: Binay Integer in CAS - Alberto Candel - 06-10-2014 09:58 PM

Adding to the above, a suggestion.

The command CONVERT in the ToolBox does not work in CAS as described in the example given in Help.
So it seems that "convert" and "CONVERT" are different things in CAS. Maybe adding a "convert" (lower case)
should be considered.

Thanks

A.


RE: Binay Integer in CAS - Alberto Candel - 06-10-2014 10:02 PM

(06-10-2014 09:58 PM)Alberto Candel Wrote:  Adding to the above, a suggestion.

The command CONVERT in the ToolBox does not work in CAS as described in the example given in Help.
So it seems that "convert" and "CONVERT" are different things in CAS. Maybe adding a "convert" (lower case)
should be considered.

Thanks

A.

Forgot to say, neither CONVERT(19,base,2) nor convert(19,base,2) work in Home.


RE: Binay Integer in CAS - Joe Horn - 06-11-2014 07:09 AM

(06-10-2014 09:40 PM)Alberto Candel Wrote:  But "convert" reverts to CONVERT in CAS (which is not the CONVERT in Tool Box I think)
Input:

convert(17, base, 2)

result:

CONVERT(CONVERT(19,base),2) [1 1 0 0 1]

It doesn't actually revert to CONVERT; that's merely how it's displayed when "Textbook Display" mode is turned on (Home Settings page 2, not page 1). When Textbook Display is turned off, "convert" is displayed the way it was typed. CAS is sometimes easier to use with Textbook Display turned off.


RE: Binay Integer in CAS - parisse - 06-11-2014 08:38 AM

This is indeed a very confusing bug in textbook mode display: lowercase CAS commands are displayed uppercase if they have a Home "synonym" (I quote synonym because they are many commands where they are not synonyms). For this reason, until it is fixed, I never use textbook mode on the Prime :-(


RE: Binay Integer in CAS - Alberto Candel - 06-11-2014 10:47 AM

Thanks to both Joe and Bernard. I will keep the textbook display in mind. Maybe this could be fixed if each CAS and Home had it's own textbook display choice.