Slashdot Mirror


Fun with Prime Numbers

Steve Litt writes "Fun With Prime Numbers contains a series of prime number finding algorithms starting with the most brute force imaginable, and working up to a paged algorithm capable of finding the first 1,716,050,469 primes in an hour and a half on a commodity machine. There are faster algorithms on the net, but these algorithms are within the reach of mere mortals and are fully explained."

6 of 472 comments (clear)

  1. Nice disclaimer by cmcguffin · · Score: 0, Offtopic

    > User assumes all risk and responsibility for any outcome.

    I sure hope that doesn't include responsibility for brining his web server to its knees. I feel so guilty!

  2. Fun With... by FunWithHeadlines · · Score: 0, Offtopic
    "Fun With Prime Numbers"?! Hey! That infringes upon Fun With Headlines my intellectual property! I'll sue!

    Naaaah. I'll let them get away with it by leaving this blatant advertising instead.

    (Hint to the clue-challenged: I'm joking. I am not in favor of IP as a concept, which is why I give my feeble jokes away for free, which is about twice what they're worth)

  3. Not slashdotted when I went there... by cmpalmer · · Score: 0, Offtopic

    Either he's got a good server, or no one cared enough to look.

    That's the ultimate insult -- making the front page of Slashdot, then *not* getting Slashdotted as a result...

    --
    -- stream of did I lock the front door consciousness
  4. Imagine... by NiTr|c · · Score: 0, Offtopic

    The author was definately imagining a beowulf cluster of prime number solvers.

    --
    Try actually thinking for yourself. It's quite refreshing.
  5. Re:a test by dtfinch · · Score: 0, Offtopic

    Sorry, you admitted in public that you use a celeron instead of the required AMD processor.

    I'll go ahead and say more than I need to here, in part because I have nothing better to do, or maybe because of my ADD, since the former is a lie.

    Yes, I'm cheap. Low income. Student budget. No scholarships.

    It's actually a Dell Dimension 2400n. Shipped with no operating system, it was the cheapest they had. I chose to get 512mb ram, an 80gb hd, a 17" monitor (also the cheapest they had), and a dvd drive. No CD burner, but I already have one elsewhere.

    The graphics chipset is an integrated Intel i845GV. I'm sure the GV stands for Great Value, because as expected, it's not only about 1/20th as fast as the middle end 3D cards, it's about 1/3th as fast as its low end integrated competitors. Add to that the Linux driver's buggy, encouraging me to use software rendering. I managed to speed up mesa to make some games quite playable at a severe cost to quality, like bzflag, but I think I forgot to back it up when I last wiped the hard disk.

    My cheap system is currently running Ubuntu 4.10. After editing /etc/apt/sources.list to add some extra repositories, I find it very palatable. Other distributions I've installed on it include Slackware 10, Mandrake 9, Suse 9, Fedora Core 2, and CentOS 3.

    My older system is an eMachine eTower 500ix. It has a 500mhz celeron, 256mb ram, and an 80gb hd. And it has a 64mb ATI Radeon 7500 and a 52x cd burner, both of which I'll probably move to my newer piece of crap one of these days, if I don't just buy a better system. On it I have Windows XP Professional and Visual Studio.NET, both of which were given to me for free for being a student. But not surprisingly, VS.NET started having problems at about the same time the next version came out, so now if I program with .NET I use SharpDevelop. I keep both systems side by side on my desktop, though most days I don't even turn the Windows PC on.

    I buy my games about 3-4 years after they hit the market, when they find their way into the $10 or less racks. I got Quake II for $1.42 on sale at Office Depot and Quake III for $9.95 at WalMart, not that I've played either in the past few months.

    But I'm not entirely cheap. I probably spend around 5-10% of my income on open source related donations. Among that, $60 to GrokLaw to fight SCO fud. And probably 95% of my music collection is stuff I've bought, mostly Weird Al. Also Tom Lehrer, the Beatles, and Ozzy. Some of it as a result of sampling on Kazaa and deciding to buy the CD.

  6. 2 + 2 does = 5 by judowillreturns · · Score: 0, Offtopic

    Let x = y
    Multiply both sides by x:
    x^2 = xy
    Subtract y^2:
    x^2 - y^2 = xy - y^2
    Now we can factorise. The left side is done using the difference of two squares method, the right is a simple factorisation.
    (x + y)(x - y) = y(x - y)
    Now we can cancel out (x - y) i.e. divide both sides by this:
    x + y = y

    So if x = y, then x + y = 2y
    Therefore:
    2y = y

    Give y an arbitary value, e.g. 1:
    2 = 1

    We can also set y to the power of 0 on both sides, also giving us
    2 = 1

    IANAM (I am not a mathematician, nor a great speller).

    *Sanity note: Yes, there IS a flaw with this, how long will it take /. to figure out high school maths?