Post Reply 
Problem with HEAD & TAIL Programmes on HP 33s
09-02-2022, 10:14 AM (This post was last modified: 09-02-2022 10:14 AM by Gerald H.)
Post: #8
RE: Problem with HEAD Programme on HP 33s
I had a similar problem with the programme TAIL, which removes the initial digit of a natural number, consistently erring for very large numbers:

Code:
1.    LBL T
2.    x=0?
3.    RTN
4.    STO N
5.    LOG
6.    IP
7.    10^x
8.    STO/ N
9.    x<> N
10.    FP
11.    RCL* N
12.    RTN

T: LN = 36

Following Thomas' suggestions in his programme, I now use the inflated programme below, which gives consistently correct answers.

I write "inflated" as the programme is more than double the size of my old programme, but perhaps it's as small as can be.

Code:
1.    LBL T
2.    x=0?
3.    RTN
4.    STO N
5.    SQRT
6.    LOG
7.    IP
8.    ALOG
9.    STO T
10.    CLx
11.    RMDR(N:T)
12.    STO R
13.    +/-
14.    RCL+ N
15.    STO N
16.    LOG
17.    IP
18.    ALOG
19.    STO L
20.    CLx
21.    RMDR(N:L)
22.    RCL+ R
23.    RTN

T: LN = 87
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Problem with HEAD Programme on HP 33s - Gerald H - 09-02-2022 10:14 AM



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