in reply to Re: Challenge: Nearest Palindromic Number
in thread Challenge: Nearest Palindromic Number

Roy Johnson,
This fails on the same test that halley's does:

N = 1085, X = 1111

I see you updated the code, I will test it more rigorously and let you know.

Cheers - L~R

  • Comment on Re^2: Challenge: Nearest Palindromic Number

Replies are listed 'Best First'.
Re^3: Challenge: Nearest Palindromic Number
by Roy Johnson (Monsignor) on Feb 02, 2005 at 19:37 UTC
    I hadn't seen that at the time I posted. And I had modified it by the time your response showed up. Now I've modified it again, and I think it's airtight. :-)

    Caution: Contents may have been coded under pressure.
      Roy Johnson,
      I tested it from N = 1 to N = 332_288 1_500_000 as well as 11_441 random numbers between 1 and 999_999_999. It provided acceptable solutions for all of them. Good job.

      Cheers - L~R