The Museum of HP Calculators

HP Forum Archive 15

[ Return to Index | Top of Index ]

no fraction mark in the output of an hp49G+
Message #1 Posted by Benny Vanrutten on 6 Mar 2006, 11:01 a.m.

On the hp49G+ I like to convert a binary to real:

# 11111000b B->R then I got 248, I like to have there 248 without ",". I allready changed flag 105, set the mode to std and tried many other flags. Who can help?

Thanks a lot.

Benny

      
Re: no fraction mark in the output of an hp49G+
Message #2 Posted by Tim Wessman on 6 Mar 2006, 11:13 a.m.,
in response to message #1 by Benny Vanrutten

Do you want "256." or "256," or "256" ?

If you want "256.", clear flag 51. Set flag 51 for "256,". If you want "256" then that is an integer not a real. Run R->I to get a zint.

TW

            
Re: no fraction mark in the output of an hp49G+
Message #3 Posted by benny vanrutten on 6 Mar 2006, 12:11 p.m.,
in response to message #2 by Tim Wessman

Thanks Tim,

I need 248

The R->I does the job. The funniest thing is that I loaded the same flags (with RCLF and STOF) from my HP4GX into my HP49G+ and I do not have the problem on that(hp48GX) machine.

Kind regards, Benny

                  
Re: no fraction mark in the output of an hp49G+
Message #4 Posted by Thomas Okken on 6 Mar 2006, 12:29 p.m.,
in response to message #3 by benny vanrutten

The HP-48 does not distinguish between "real" and "integer" -- I assume the convention of showing reals like "248," even when their fractional part is zero, is something that was added in the 49.

- Thomas

                        
Re: no fraction mark in the output of an hp49G+
Message #5 Posted by benny vanrutten on 6 Mar 2006, 2:26 p.m.,
in response to message #4 by Thomas Okken

Hi Thomas,

The HP48GX gives the answer I need, but giving the same command to the HP49G+ responds in the value followed by the unwanted fraction mark. The HP48G advanced users guide however describes the B->R command as Binary to REAL, the result is affected by the mode FIX or STD.

Kind regards,

Benny

                              
Re: no fraction mark in the output of an hp49G+
Message #6 Posted by Crawl on 6 Mar 2006, 4:07 p.m.,
in response to message #5 by benny vanrutten

The difference between 248 and 248. is important on the 49G+.

248 is the exact number, "Two hundred Forty Eight".

248. is the decimal approximation.

While the mode (exact vs. approximate) is important, the difference can be illustrated by

1 divided by 3 = 1/3, the exact fraction.

1. divided by 3 = 0.3333333333, the decimal approximation.

                  
Re: no fraction mark in the output of an hp49G+
Message #7 Posted by James M. Prange (Michigan) on 6 Mar 2006, 6:19 p.m.,
in response to message #3 by benny vanrutten

The 48 series has system flags -1 through -64 and user flags 1 through 64. The 49 series has system flags -1 through -128 and user flags 1 through 128.

"Exact" versus "approximate" modes are controlled by system flag -105; within a program, clear it for exact mode, or set it for appoximate mode. For interactive use, hold down the RightShift key while pressing the ENTER key to toggle between exact and approximate modes.

Regards,
James

Edited: 6 Mar 2006, 6:26 p.m.

                  
Re: no fraction mark in the output of an hp49G+
Message #8 Posted by James M. Prange (Michigan) on 6 Mar 2006, 6:33 p.m.,
in response to message #3 by benny vanrutten

The 49 series lacks built-in B->I and I->B UserRPL commands, so converting between these object types are 2-step processes. You could write your own programs:

B->I
<< B->R R->I >>

I->B << I->R R->B >>

Regards,
James

                        
Re: no fraction mark in the output of an hp49G+
Message #9 Posted by Benny Vanrutten on 7 Mar 2006, 3:51 a.m.,
in response to message #8 by James M. Prange (Michigan)

Thanks James,

That's (B->I) exactly what I added to my program last night.

Benny


[ Return to Index | Top of Index ]

Go back to the main exhibit hall