Re: Need Help HP-50G Integer vs Real numbers (449 Views)
Occasional Visitor
Posts: 2
Registered: ‎10-14-2007
Message 1 of 3 (449 Views)

# Need Help HP-50G Integer vs Real numbers

When using the Integer Part Function (IP)which returns the integer part of the argument, the funtion also is returning a decimal point which implies it's a real number. Example IP(54.376) should return "54" and not "54.". I have approx turned off in CAS. This is causing me a display problem in a User RPL program. Is there a flag to set to supress the decimal point. My old HP48G returns the number without the added decimal point. Thank You
Highlighted
Trusted Contributor
Posts: 78
Registered: ‎11-18-2004
Message 2 of 3 (449 Views)

# Re: Need Help HP-50G Integer vs Real numbers

hello,

let me try to explain.
your 48 only knows about "Real" numbers, it does not know "integers" (unless you are talking about binary integers like #12ABCh, but that is another issue).

the 48 displays real that have no fractional part without a decimal point.

the 50g has an integer type and a real type. reals ALWAYS have a decimal point, even if they have no fractional part.

now, the IP function takes a real and removes it's fractional part, leaving only the integer part, but still return a real (for example, 12.123131231E14 will return the same number).

to transform a real in an integer, you would need to use the R->I function that does that. but this is different from the IP fnction.

hope that it helps.

cyrille
Occasional Visitor
Posts: 2
Registered: ‎10-14-2007
Message 3 of 3 (449 Views)

# Re: Need Help HP-50G Integer vs Real numbers

cyrille:

Thanks for your input (well stated). I modified my program and added the Real to Integer function and solved my display problem (no more decimal point).

Thank You,
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.