in reply to Re^4: OT: Finding Factor Closest To Square Root
in thread OT: Finding Factor Closest To Square Root

I fixed a different bug and re-broke this! Ok, it's updated and works at least for your example. Gotta update my benchmark code, too.

Caution: Contents may have been coded under pressure.
  • Comment on Re^5: OT: Finding Factor Closest To Square Root

Replies are listed 'Best First'.
Re^6: OT: Finding Factor Closest To Square Root
by Limbic~Region (Chancellor) on Feb 28, 2005 at 19:30 UTC
    Roy Johnson,
    Ok, now it is broken for 26816652079 which has a prime factorization of (7,19,109,691,2677). The correct answer should be 91903.

    Cheers - L~R

    Update:Impressive! After your last updated, not only does it now get all 50_000 answers correct - it is within a few seconds of my Inline::C solution. A proper benchmark might find it faster.