HP Forums
Comma Separated Values 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: Comma Separated Values in CAS (/thread-10975.html)



Comma Separated Values in CAS - Bobby_Engineer - 06-28-2018 10:34 PM

Hi fellow HP users

Is there a way to have Comma Separated Values in the CAS operating system for a number as large as 135,000,000.

Thanks


RE: Comma Separated Values in CAS - parisse - 06-29-2018 04:14 AM

No. Here you can enter 135*10^6 (exact) or 135e6 (approx).


RE: Comma Separated Values in CAS - cyrille de brébisson - 06-29-2018 05:19 AM

Hello,

Unfortunately, there is no place in Prime where you can coma separate large numbers for INPUT.
Display will show comma separation (or whaetever you have selected. Please note that Prime can display numbers in a large number of formats, including thousand coma separation, but also thousand . separation, space separation, tick separation, Asian 10000 separation or India's 1000/100 schemes!)

The main reason is characters overload. Comma can already mean a lot of different thing on the calculator and adding more 'meanings' can make parsing of inputs impossible.
is {100,234,567} one comma separated large number of 3 numbers?

Cyrille


RE: Comma Separated Values in CAS - Joe Horn - 06-29-2018 03:04 PM

Just in case the OP meant, "Can CAS display large numbers with thousands separators?" then I'm pretty sure that the answer is NO. No matter which Number Format or Digit Grouping you select in Home Settings, CAS never inserts any thousands separators. You can, however, use the STRING function in a CAS program to insert thousands separators into an output:

STRING(123456789,2,2,"1,000,000") --> "123,456,789"

See the Help screen for STRING for further information about its many formatting options.


RE: Comma Separated Values in CAS - Bobby_Engineer - 06-29-2018 10:04 PM

(06-29-2018 03:04 PM)Joe Horn Wrote:  Just in case the OP meant, "Can CAS display large numbers with thousands separators?" then I'm pretty sure that the answer is NO. No matter which Number Format or Digit Grouping you select in Home Settings, CAS never inserts any thousands separators. You can, however, use the STRING function in a CAS program to insert thousands separators into an output:

STRING(123456789,2,2,"1,000,000") --> "123,456,789"

See the Help screen for STRING for further information about its many formatting options.

Thank you, I wish I understood why such an high tech device does not have thousands separators, the work around for me is to copy the numerical value from CAS into the home view screen. I like to use both algebraic mode CAS and RPN when working solutions.

Still a great calculator.


RE: Comma Separated Values in CAS - Tim Wessman - 06-30-2018 02:33 AM

Press the MENU hard key, then pick "get from home" or "get from cas" to make it easy to pull things between. No need to retype if you are just exchanging prior results.


RE: Comma Separated Values in CAS - cyrille de brébisson - 07-02-2018 05:49 AM

Hello,

The cas does not have thousand separator because the CAS does only has one "transform to string function", and does not know when a string will be used to "math" and when it will be used for display only.

The problem lies in the fact that, although 1000 separators are nice for display, they are completely unuseable for editing (see my previous post). As a result, it becomes critical, when tranforming a number into a string to know what it will be used for after. Pure display? 1000 separator are OK. Used in a command line or edition? Not ok...

It took us over 1 year to add 1000 separators to the home side of things and remove all the bugs/bad use cases...

Cyrille