HP Forums
Hp 28s number format - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Hp 28s number format (/thread-22662.html)



Hp 28s number format - joan cardenas - 10-03-2002

Hello,

Is sombody know how to get the following number format in a Hp 28s ?

1.234,89

Thanks in advance


Re: Hp 28s number format - Vieira, Luiz C. (Brazil) - 10-03-2002

Hi;

the HP28S offers two ways to accomplish this:

1) - press the [SHIFT] key (the dark-red one in the right-side keyboard)

2) - press the cursor key, where you read MODE in dark red, over the key

3) - press [NEXT] key, the last key, right side, in the same row

4) - find the label [RDX,], over the fifth key in the top row;

5) - press the key right above it; you see that it appears a little square in the label itself

Now your numbers will be shown with a comma as a decimal radix instead of a period. You can also type:

48 SF
and press [ENTER] to get the same result. If you want to get back to the default, you type:
48 CF

I hope it helps.


Re: Hp 28s number format - joan cardenas - 10-03-2002

Thank you Mr.Vieira,

But probably I didn't explain well the problem;

the display shows the number

2944633622,84


and I'd like to see

2.944.633.622,84


In the rest of the Hp machines I know is possible, isn't the same in the Hp 28s.?

Lots of thanks


Re: Hp 28s number format - Glen Kilpatrick - 10-03-2002

That *looks* like (gimme a break here, it's been a long time since I owned a 28) you've already got the RADIX correct, and have STD display set. Try 2 FIX instead (that works for my 48S).


Re: Hp 28s number format - joan cardenas - 10-03-2002

It don't work,

I think the Hp 28 use the comma or the point instead of the space for to separate two differents objects, if is true is going to be impossible to see the number in that way.




Re: Hp 28s number format - Vieira, Luiz C. (Brazil) - 10-03-2002

Hi;

You're right: there is no thousands separator in the HP28S. If you have period as radix mark, either comma OR space act as number separator; if you have comma as radix mark, period OR space will separate number (e.g. complex numbers, matrix elements, etc.).

I missed this in your first question; you made it correctly.

Cheers.




Re: Hp 28s number format - joan cardenas - 10-04-2002

That's a real shame.

I think the feeling of Hp28's keys are nearly perfect, much better than other Hp like 32sii, 48gx ,42s and of course 49g, but working with big numbers is impossible be confortable with the display format.

I'll continue searching....

Cheers


Re: Hp 28s number format - Vieira, Luiz C. (Brazil) - 10-04-2002

Me, again.

Would a small program help? Say, a small program that you would use just to show the final result with thousands separator? If so, tell me and I'll do it. In fact, my neurons are thinking of 1000, /, ->STR, ".", POS... It can be done, for sure.

Just a moment and I'm calling you back...


Re: Hp 28s number format - the final program - Vieira, Luiz C. (Brazil) - 10-04-2002

Hi;

The first version of this program took me a little bit longer because I had to drive my daughter to school.

Later, some complications were detected, sometimes when STD mode was set, others when FIX mode was set. I realised that the same number will have a different character size in both representation, and that was the major trouble. We know that, but the program must detect it.

I know the final program (shown here) is somewhat big, but I did not refine it. Here is the listing: (A1 is an auxiliary program; the main one I named THO, for thousand)

« IF OVER SIZE == THEN "0" SWAP + END »
'A1' [STO]

« DUP ABS RCLF -> N F
« N FP ->STR
IF DUP SIZE 1 ==
THEN DROP ""
END
IF DUP 1 1 SUB "0" ==
THEN 2 OVER SIZE SUB
END -> W
« 0 FIX ""
WHILE N XPON 2 >
REPEAT 48 FC? "," "." IFTE N 1000 / DUP 'N' STO FP 1000 * IP ->STR 2 A1 3 A1 1 3 SUB + SWAP +
END N IP ->STR 1 OVER SIZE 1 - SUB SWAP + W + OVER 0 <
IF
THEN "-" SWAP +
END F STOF 1 DISP
»
»
»
'THO' [sto]

It will work fine with negative numbers with FIX or STD modes, regardless radix mark type (it detects). Also, exponent of ten should be less than 12. If you use ENG or SCI, resulting display will be awkward.

I am almost sure it can be smaller, but I did not take the time to shorten it. If someone else has a shorter version, please, post it here.

Hope it helps.


Re: Hp 28s number format - the final program - joan cardenas - 10-06-2002

I'm impressed, is exactly what I need for my new Hp 28s.
The little program is unexpensive for me.

A lot of thanks Luiz.