HP Forums
no fraction mark in the output of an hp49G+ - 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: no fraction mark in the output of an hp49G+ (/thread-88647.html)



no fraction mark in the output of an hp49G+ - Benny Vanrutten - 03-06-2006

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+ - Tim Wessman - 03-06-2006

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+ - Benny Vanrutten - 03-06-2006

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+ - Thomas Okken - 03-06-2006

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+ - Benny Vanrutten - 03-06-2006

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+ - Crawl - 03-06-2006

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+ - James M. Prange (Michigan) - 03-06-2006

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+ - James M. Prange (Michigan) - 03-06-2006

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+ - Benny Vanrutten - 03-07-2006

Thanks James,

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

Benny