Post Reply 
Weekend Challenge Sharpened: Missing Positions in Champernowne's Constant
08-09-2015, 10:12 PM
Post: #14
RE: Weekend Challenge Sharpened: Missing Positions in Champernowne's Constant
As far as fixing my bug goes, if I replace the final two lines of my code in Post #5:

Code:
    c.to.go c.width.at.ch MOD
    + +

with:

Code:
    +
    c.to.go
    ints.to.go c.width.ch *
    -
    DUP
    IF 0 ≠
    THEN 1 + +
    ELSE DROP
    END

then the bug is removed (and the program is hideous) and correctly the program returns 11 for an input of 1, 191 for an iinput of 91, 1089 for an input of 690, and, for example, 1124999999 for an input of 987654321.

I have a version with no iteration under construction...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Weekend Challenge Sharpened: Missing Positions in Champernowne's Constant - nlj - 08-09-2015 10:12 PM



User(s) browsing this thread: