05-14-2010 07:14 PM
Hello,
We were doing some experiments trying to calculate the 100.000st prime number in labview as fast as possible.
Some of us got to about 7 seconds. Does anyone know a way to calculate it faster using labview?
Kev
05-14-2010 09:20 PM
05-15-2010 03:55 AM
05-15-2010 06:14 AM
thanks for the replys. Any chance we could see a VI of this?
Grtz
Pluv
05-15-2010 06:30 AM - edited 05-15-2010 06:36 AM
Hi Pluv,
the VI is mainly based on those Coding challenge linked by Raven's Fan...
And as this sounds like homework (or similar) I would suggest to read that old thread, read articles on Wikipedia, and then do some own coding instead of adorning with borrowed plumes... To calc primes is described in numerous places in the internet, all you need is reading and coding!
And here's you can look at my VI:
One correction to my first post: you only need to calc upto 1.3e6... The 100.000th prime is 1299709.
05-15-2010 06:37 AM - edited 05-15-2010 06:40 AM
Hi GerdW,
This actually wasn't homework, it was a challenge from a teacher after our final lessons. This might be usefull for exams but it's not an assignment.
I allready saw a couple using the same technique over & over. The old record was 17s yet we managed to improve that in a couple of hours.
So i was wondering if we could do it in a couple of hours, then experts should be able to do it alot faster ( as u said 30ms).
The reason i want to see VI's is to understand labview better. Seeing these things one way is fine, but it's when u start comparing different ways to the same problem that u rlly start learning 🙂
So thanks for the replys!
Grtz