Post Reply 
33s Evaluates Some Large Powers 50g Refuses
08-18-2022, 08:43 AM
Post: #3
RE: 33s Evaluates Some Large Powers 50g Refuses
Thank you, Steve, that solves it for smaller numbers.

I came upon this when writing

https://www.hpmuseum.org/forum/thread-18683.html

The programme is compact:

Code:
1.    LBL B
2.    STO N
3.    CLx
4.    N+(-1)^N+2*(-1)^IDIV(N:2)
5.    RTN

K: LN = 40        CK = 25E5

Trying this on the 50g I was disappointed at the error report for larger powers of 1 & -1, ie greater than 999999999999. The programme below works for larger numbers, nevertheless it's a disappointment the 50g gives up at some point in powers of the unit.

Code:
Size: 96.

CkSum: # 7D33h

::
  CK1&Dispatch
  # FF
  ::
    FPTR2 ^DupZIsEven?
    ITE
    ZINT 1
    ZINT -1
    OVER
    ZINT 2
    FPTR2 ^ZQUOText
    FPTR2 ^DupZIsEven?
    SWAPDROP
    ITE
    ZINT 1
    ZINT -1
    DUP
    FPTR2 ^RADDext
    FPTR2 ^RADDext
    FPTR2 ^RADDext
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: 33s Evaluates Some Large Powers 50g Refuses - Gerald H - 08-18-2022 08:43 AM



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