naught101 / sobol_seq

python implementation of Sobol' sequence generator
MIT License
67 stars 29 forks source link

Prime number calculation sped up + cleanup #4

Closed sjvrijn closed 8 years ago

sjvrijn commented 8 years ago

The calculations in is_prime(n) only have to run up to sqrt(n), and can skip any number of the form 2n and 3n, leaving those of the form 6n+1 and 6n+5. Cleanup:

sjvrijn commented 8 years ago

Thanks for the comments, I'll fix them and create a new pull request

naught101 commented 8 years ago

I think that if you update though branch the pull request should update automatically, no need to open a new one.

On 29 February 2016 10:17:32 pm AEDT, Sander notifications@github.com wrote:

Thanks for the comments, I'll fix them and create a new pull request


Reply to this email directly or view it on GitHub: https://github.com/naught101/sobol_seq/pull/4#issuecomment-190161193

Sent from my Android device with K-9 Mail. Please excuse my brevity.

sjvrijn commented 8 years ago

Fixes are up and thanks for the tip, didn't realize that

naught101 commented 8 years ago

Great, thank you :)