Re: Prime[x] crashes kernel for large x
- To: mathgroup at smc.vnet.net
- Subject: [mg7870] Re: [mg7762] Prime[x] crashes kernel for large x
- From: sergio at scisun.sci.ccny.cuny.edu (Sergio Rojas)
- Date: Thu, 17 Jul 1997 15:35:35 -0400
- Organization: City College Of New York - Science
- Sender: owner-wri-mathgroup at wolfram.com
Does any one know if this kind of problem has relation with the " flaw in the precision of the floating point divide operation of the Pentium processor" described in the Intel FAQ found in: http://support.intel.com/oem_developer/microprocessors/pentium/PPFPU.HTM http://support.intel.com/enduser_reseller/pentium_processors/10191.HTM Rojas E-mail: sergio at scisun.sci.ccny.cuny.edu Richard Finley (trfin at fiona.umsmed.edu) wrote: : I get the same problem with Mma 3.0 (on a Pentium Pro 200 Win95 system) .. I : have to restart the kernel before proceeding. One other curiosity, I was : trying to find out approximately what size number would cause it to crash : and I noted that 2^26 was OK but 2^27 consistently crashes. I started : walking up from 2^26 + 40000000 and found that if I go from that to : 2^26+50000000 it crashes, but if I perform consecutive trials from 40000000 : in steps of 1000000 I can continue to at least 150000000 (which is greater : than 2^27) without crashing (that's where I ran out of patience...I don't : know how far it would have continued.) Why computing Prime[n+k] should : depend on whether you computed Prime[n] in the previous calculation is : beyond my understanding of Mma but it is certainly true. For example, if I : compute Prime[2^26 + 40000000]//Timing , it takes 8.47 sec the first time : you do it, but if you compute it again it gives 0. sec. It appears it : "remembers" previous calculations and I presume it somehow uses the results : in computations of larger primes...so Prime[2^26 + 50000000] crashes only if : you didn't perform Prime[2^26 + 49000000] etc..first. Do others get the same : result on other platforms? Any ideas from anyone ? -- Wolfram ? : RF : At 02:36 PM 7/8/97 -0400, you wrote: : > : >When I try to find a large prime, for example: : > : >Prime[2^32 - 1] : > : >The math kernel crashes with a divide error, and I can't restart it : >without quitting mathematica (3.0) and restarting. Am I doing something : >wrong, or is this a bug? : > : >Thanks, : > : >Michael : >michael at qni.com : > : > : > : > : > : >