The Museum of HP Calculators

HP Forum Archive 09

[ Return to Index | Top of Index ]

Hp 28s number format
Message #1 Posted by Joan Cardenas on 3 Oct 2002, 7:17 a.m.

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
Message #2 Posted by Vieira, Luiz C. (Brazil) on 3 Oct 2002, 11:10 a.m.,
in response to message #1 by Joan Cardenas

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
Message #3 Posted by Joan Cardenas on 3 Oct 2002, 11:42 a.m.,
in response to message #2 by Vieira, Luiz C. (Brazil)

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
Message #4 Posted by Glen Kilpatrick on 3 Oct 2002, 11:54 a.m.,
in response to message #3 by Joan Cardenas

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
Message #5 Posted by Joan Cárdenas on 3 Oct 2002, 12:25 p.m.,
in response to message #4 by Glen Kilpatrick

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
Message #6 Posted by Vieira, Luiz C. (Brazil) on 3 Oct 2002, 12:35 p.m.,
in response to message #5 by Joan Cárdenas

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
Message #7 Posted by joan cardenas on 4 Oct 2002, 9:34 a.m.,
in response to message #6 by Vieira, Luiz C. (Brazil)

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
Message #8 Posted by Vieira, Luiz C. (Brazil) on 4 Oct 2002, 9:57 a.m.,
in response to message #7 by joan cardenas

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
Message #9 Posted by Vieira, Luiz C. (Brazil) on 4 Oct 2002, 2:04 p.m.,
in response to message #7 by joan cardenas

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
Message #10 Posted by Joan Cárdenas on 6 Oct 2002, 3:55 p.m.,
in response to message #9 by Vieira, Luiz C. (Brazil)

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.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall