Post Reply 
(12C) Check if given number is Prime Number or not
09-11-2018, 06:45 AM
Post: #7
RE: (12C) Check if given number is Prime Number or not
(09-11-2018 05:42 AM)Gamo Wrote:  Is this another rounding problem on the 12C ?

Yes. Since the real HP-12C uses 10 digits: 9,000,000,001 ÷ 2 = 4,500,000,001.
The fractional part of this number is 0 and the program jumps to line 29:
Code:
04 RCL 0
05 2
06 STO 2
07 ÷
08 FRAC
09 X=0?
10 GTO 29

And thus the program tells you erroneously that this number is divisible by 2.

HTH
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (12C) Check if given number is Prime Number or not - Thomas Klemm - 09-11-2018 06:45 AM



User(s) browsing this thread: 2 Guest(s)