Binay Integer in CAS
06-09-2014, 05:03 PM
Post: #1
 Alberto Candel Member Posts: 169 Joined: Dec 2013
Binay Integer in CAS
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
06-09-2014, 05:07 PM
Post: #2
 Tim Wessman Senior Member Posts: 2,091 Joined: Dec 2013
RE: Binay Integer in CAS
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.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
06-09-2014, 05:17 PM
Post: #3
 Alberto Candel Member Posts: 169 Joined: Dec 2013
RE: Binay Integer in CAS
(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.
06-10-2014, 05:50 AM
Post: #4
 parisse Senior Member Posts: 997 Joined: Dec 2013
RE: Binay Integer in CAS
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).
06-10-2014, 06:12 PM
Post: #5
 Alberto Candel Member Posts: 169 Joined: Dec 2013
RE: Binay Integer in CAS
(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
06-10-2014, 07:19 PM
Post: #6
 parisse Senior Member Posts: 997 Joined: Dec 2013
RE: Binay Integer in CAS
Try convert lowercase not uppercase. CAS functions are lowercase.
06-10-2014, 09:40 PM
Post: #7
 Alberto Candel Member Posts: 169 Joined: Dec 2013
RE: Binay Integer in CAS
(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)
06-10-2014, 09:58 PM
Post: #8
 Alberto Candel Member Posts: 169 Joined: Dec 2013
RE: Binay Integer in CAS
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.
06-10-2014, 10:02 PM
Post: #9
 Alberto Candel Member Posts: 169 Joined: Dec 2013
RE: Binay Integer in CAS
(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.
06-11-2014, 07:09 AM
Post: #10
 Joe Horn Senior Member Posts: 1,454 Joined: Dec 2013
RE: Binay Integer in CAS
(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.

<0|ΙΈ|0>
-Joe-
06-11-2014, 08:38 AM
Post: #11
 parisse Senior Member Posts: 997 Joined: Dec 2013
RE: Binay Integer in CAS
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 :-(
06-11-2014, 10:47 AM (This post was last modified: 06-11-2014 10:47 AM by Alberto Candel.)
Post: #12
 Alberto Candel Member Posts: 169 Joined: Dec 2013
RE: Binay Integer in CAS
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.
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)