Note on archived topics.
06-14-2013 02:31 PM
On my HP15c LE calculator, there appears to be a bug in computing values with fractions.
This same problem occurs on the iPhone emulator produced by HP but not emulators produced by others for use on PCs and iPhone/iPad devices.
To reproduce the problem:
1. Enter the following: "1234567890."
2. Press <ENTER> key
3. Enter ".22" "+" (add .22 to the value entered in #1 above)
4. Press <f> <FRAC> to display the fraction component of the sum
My HP15c LE (sn CNA21602KJ) displays "0.0000"
It should display "0.2200"
This problem occurs regardless of display settings (any number of digits after the radix mark), and in FIXED, SCIENTIFIC or ENGINEERING format.
Is this a known problem? What can be done to work around or avoid the problem. Any assistance would be hugely appreciated.
06-14-2013 05:19 PM - edited 06-14-2013 05:23 PM
This is not a bug but a characteristic of the calculator. The HP-15C is a 10 digit calculator, so when you have entered 1234567890 you have used all 10 digits. The 0.22 becomes insignificant and is discarded.
See p60 (Section 5) of the manual, "Mantissa Display" and "Round-Off Error".
The HP emulator of the 15C is an exact duplication of the real calculator (it uses a copy of the actual ROM). Other 15C emulators do not use the actual calculator's ROM (due to copyright issues) and probably implement routines that use the compiler's maths library (probably based on IEEE 754). Hence they use more significant digits and the "bug" does not occur.
Unfortunately there is nothing that can be done about this, it is a limitation of the tool. You could keep portions of the number in different registers, as done in this article:
see last section: 306 decimal digits of pi on the HP-15C (using 51 registers, 6 digits per register).
Hope this sheds some light on the issue.
06-14-2013 10:20 PM
Okay. Thank you for this and your account regarding emulators is something I should have considered myself. I had read these sections in the handbook but not connected them to the performance I noted.
As the manual (p. 69, end of `Round-Off Error') suggests, I will have to go to the Advanced Functions Handbook to see how they suggest the 10 digit limit is to be assessed. Fortunately, that is available online in PDF (http://www.hp.com/ctg/Manual/c03308725.pdf).