primes for large n: 2^30, system memory limit -凯发k8网页登录
solution stats
last submitted on may 06, 2023
problem comments
-
3 comments
on 6 aug 2013
nice problem!
i have had some problems to get trough the test suite, one of them was that my primes where in uint32 and that failed the 'isprime' assertion.
maybe you could change the following line
pchk=p(ptr);
to
pchk=double(p(ptr));
richard zapor
on 7 aug 2013
double implemented in test suite. intent is to find the primes, not to get snared by errant function limitations.
on 21 sep 2020
currently the matlab function primes is able to solve this problem. since systems always evolve, the problem's author will probably have to be constantly updating it. or at least, once a year.
solution comments
problem recent solvers
suggested problems
-
1939 solvers
-
419 solvers
-
506 solvers
-
634 solvers
-
208 solvers
more from this author
problem tags
community treasure hunt
find the treasures in matlab central and discover how the community can help you!
start hunting!