Post Reply 
OEIS A228297: Need Help to Find Algorithm
09-18-2017, 04:34 PM
Post: #14
RE: OEIS A228297: Need Help to Find Algorithm
I have run up against a new problem.

If you use

N 5 / IP

to find the integer quotient of N divided by 5 on a 42S an erroneous answer is returned for large numbers, eg for

999999999999

the answer is

200000000000

whereas it should be

199999999999

I have a programme to do the calculation correctly without disturbing the stack but believe it is inefficient.

Could someone suggest a more efficient programme that leaves the stack intact?

Code:
0.    { 29-Byte Prgm }
1.    LBL “IQT5”
2.    R↑
3.    STO 01
4.    R↓
5.    STO 02
6.    5
7.    MOD
8.    +/-
9.    RCL+ 02
10.    5
11.    /
12.    R↑
13.    X<> 01
14.    R↓
15.    END
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: OEIS A228297: Need Help to Find Algorithm - Gerald H - 09-18-2017 04:34 PM



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