Post Reply 
Solving a Single Congruence Equation
07-25-2015, 10:31 PM (This post was last modified: 07-25-2015 10:31 PM by Thomas Klemm.)
Post: #9
RE: Solving a Single Congruence Equation
There was a bug in my program. I had to replace the following lines:
Code:
41>LBL 03
42 2
43 ÷
44 ENTER
45 IP
46 STO 07
47 -
48 X=0?

These are the corrected lines:
Code:
41>LBL 03
42 2
43 MOD
44 STO- 07
45 LASTX
46 STO÷ 07
47 X<>Y
48 X=0?

The problem occurred only when the value in register 07 used 12 digits.
E.g. 937,499,999,999 ÷ 2 would yield 468,750,000,000 instead of 468,749,999,999.5 and thus got rounded up.
It appears that I've tested the example with Free42 where this doesn't happen.

Sorry for any inconveniences.
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Solving a Single Congruence Equation - Thomas Klemm - 07-25-2015 10:31 PM



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