Post Reply 
RPL Mini-Challenge: All Odd Digits?
07-30-2017, 09:52 AM
Post: #46
RE: RPL Mini-Challenge: All Odd Digits?
(07-29-2017 01:26 PM)Joe Horn Wrote:  
(07-29-2017 07:12 AM)Gerald H Wrote:  Thread has gone quiet - Who won?

You and Gilles did, according to Bill Butler:

Bill Butler via email 3 days ago Wrote:... But it is Gerald H's original idea (Gilles' IFTE version of Gerald's third 07-02 program) that proves to be the winning one - if one uses POS for SREPL with a couple of technical adjustments (like using e.g. TYPE for DROP 0.) one has PSTY (#E169h, 59.) at .0359/2.12 while a LASTARG-version of the same, PSLA (#299Ah, 56.5), gives the best so far at .0367/2.07.

A score of 2.07 is less than half my original score of 4.8. Congratulations!

I guess this is Bill's programme:

Code:

« →STR 0 8
  FOR i DUP i →STR
POS 9 2 IFTE
  STEP LASTARG 2
SAME NIP
»

which has a size of 56.5 Bytes.

He's optimistic about the timing, which assumes a zero near the beginning of the test number.

Anyway fastest & smallest. Bravo!

If you really want a minimally sized programme for 1,000 digit numbers, how about:

Code:

<< DROP 0. >>

Doesn't often err.

I haven't timed it but guess it's fast.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: RPL Mini-Challenge: All Odd Digits? - Gerald H - 07-30-2017 09:52 AM



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