Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^6: Algorithm for cancelling common factors between two lists of multiplicands

by BrowserUk (Patriarch)
on Aug 10, 2005 at 23:08 UTC ( [id://482802]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Algorithm for cancelling common factors between two lists of multiplicands
in thread Algorithm for cancelling common factors between two lists of multiplicands

For numbers near 2**32, factoring a prime number seems to take 150 times longer

I'm not sure that I understand this? Factoring a prime how?

(I should also admit that I don't know what a "n-order wheel" is, or why it would benefit me to use one :)

Also, as I'm limiting my inputs to 0 .. 2**32, I only need the primes upto 65537 in order to factor that range of inputs. Right now, I am trading a little space (130k) to gain speed by building an array of the first 6534 primes at compile time.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
  • Comment on Re^6: Algorithm for cancelling common factors between two lists of multiplicands

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://482802]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-20 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found