Dismal Arithmetic & 3 Progs for 49G & Others
05-13-2015, 09:19 AM (This post was last modified: 09-08-2022 06:16 AM by Gerald H.)
Post: #23
 Gerald H Senior Member Posts: 1,567 Joined: May 2014
RE: Dismal Arithmetic & 3 Progs for 49G & Others
Given DPLUS & DMULT prompts the question: What does DPOW do?

As repeated addition of n to n produces n, this possibility is discarded as being too dull even for dismals.

Conservatively, repeated multiplication looks like a promising candidate. Here again, single digit powering is of little interest, as eg

5 d^ 300000001 = 5

but for integers > 9 the results become interesting - hopefully not so interesting
that the operation is not regarded as dismal.

So here's a provisional programme using the provisional definition of Dpowering - I name the programme DPOW.

Enter positive integer n to power to positive integer power p, eg

123
4

produces

111122223.

DPOW

Code:
::   CK2&Dispatch   # FFFF   ::     FPTR2 ^DupQIsZero?     case2drop     Z1_     FPTR2 ^DupZIsOne?     caseDROP     OVER     PTR 2F3A3     %2     %<     caseDROP     OVERUNROT     FPTR2 ^Z>ZH     FPTR2 ^ZBits     #1-     ZERO_DO     SWAPDUP     ID DMULT     SWAP     ISTOP-INDEX     #1-     FPTR2 ^ZBit?     IT     ::       SWAP3PICK       ID DMULT       SWAP     ;     LOOP     DROPSWAPDROP   ; ;

Alternative definitions of Dpowering welcome, programmes too.
 « Next Oldest | Next Newest »

 Messages In This Thread Dismal Arithmetic & 3 Progs for 49G & Others - Gerald H - 04-21-2015, 04:18 PM RE: Dismal Arithmetic with Two Programmes for the HP 49G - Didier Lachieze - 04-21-2015, 09:19 PM RE: Dismal Arithmetic with Two Programmes for the HP 49G - Gerald H - 04-22-2015, 07:04 AM RE: Dismal Arithmetic with Two Programmes for the HP 49G - Didier Lachieze - 04-22-2015, 07:16 AM RE: Dismal Arithmetic with Two Programmes for the HP 49G - Didier Lachieze - 04-22-2015, 07:45 AM RE: Dismal Arithmetic with Two Programmes for the HP 49G - Dave Britten - 04-22-2015, 01:09 AM RE: Dismal Arithmetic with Two Programmes for the HP 49G - brouhaha - 04-22-2015, 01:18 AM RE: Dismal Arithmetic with Two Programmes for the HP 49G - Tugdual - 04-22-2015, 06:55 AM RE: Dismal Arithmetic with Two Programmes for the HP 49G - Gerald H - 04-22-2015, 08:54 AM RE: Dismal Arithmetic with Two Programmes for the HP 49G - Didier Lachieze - 04-22-2015, 09:56 AM RE: Dismal Arithmetic with Two Programmes for the HP 49G - Gerald H - 04-22-2015, 10:07 AM RE: Dismal Arithmetic with Two Programmes for the HP 49G & the Prime - Dave Britten - 05-06-2015, 05:34 PM RE: Dismal Arithmetic with Two Programmes for the HP 49G & the Prime & the HP 48S - Dave Britten - 05-07-2015, 01:48 PM RE: Dismal Arithmetic with Two Programmes 49G, the Prime, 48S & 32S - Gerald H - 05-07-2015, 03:25 PM RE: Dismal Arithmetic with Two Programmes 49G, the Prime, 48S & 32S - Gerald H - 05-07-2015, 03:57 PM RE: Dismal Arithmetic with Two Programmes 49G, the Prime, 48S & 32S - Gerald H - 05-07-2015, 04:59 PM RE: Dismal Arithmetic with Two Programmes 49G, the Prime, 48S & 32S - Dave Britten - 05-07-2015, 05:36 PM RE: Dismal Arithmetic with Two Programmes 49G, the Prime, 48S & 32S - Gerald H - 05-07-2015, 06:01 PM RE: Dismal Arithmetic with Two Programmes 49G, the Prime, 48S & 32S - Dave Britten - 05-08-2015, 01:35 AM RE: Dismal Arithmetic with Two Programmes 49G, the Prime, 48S & 32S - Dave Britten - 05-08-2015, 02:53 PM RE: Dismal Arithmetic & 2 Progs for 49G, the Prime, 48S & 32S & TI & C... - Dave Britten - 05-11-2015, 04:16 PM RE: Dismal Arithmetic & 2 Progs for 49G, the Prime, 48S & 32S & TI & C... - Marcus von Cube - 05-11-2015, 06:04 PM RE: Dismal Arithmetic & 3 Progs for 49G & Others - Gerald H - 05-13-2015 09:19 AM RE: Dismal Arithmetic & 3 Progs for 49G & Others - Dave Britten - 05-13-2015, 05:59 PM RE: Dismal Arithmetic & 3 Progs for 49G & Others - Gerald H - 05-13-2015, 06:37 PM RE: Dismal Arithmetic & 3 Progs for 49G & Others - Dave Britten - 05-13-2015, 07:26 PM RE: Dismal Arithmetic & 3 Progs for 49G & Others - Gerald H - 10-28-2015, 02:17 PM RE: Dismal Arithmetic & 3 Progs for 49G & Others - Gerald H - 10-30-2015, 10:43 AM

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