Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URGENT: BUG-FIX (and heavy optimization of prime-related functions) #67

Merged
merged 4 commits into from
Aug 24, 2016

Conversation

kckennylau
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented Aug 23, 2016

Current coverage is 85.96% (diff: 44.64%)

Merging #67 into master will decrease coverage by 1.83%

@@             master        #67   diff @@
==========================================
  Files             7          7          
  Lines          1377       1411    +34   
  Methods           0          0          
  Messages          0          0          
  Branches        254        269    +15   
==========================================
+ Hits           1209       1213     +4   
- Misses          113        140    +27   
- Partials         55         58     +3   

Powered by Codecov. Last update b30ccfc...e85ab3f

@kckennylau kckennylau changed the title URGENT: BUG-FIX URGENT: BUG-FIX (and heavy optimization of prime-related functions) Aug 23, 2016
@kckennylau
Copy link
Contributor Author

DO NOT MERGE YET
there is still bugs

@kckennylau
Copy link
Contributor Author

In the future could you please write more tests?

@kckennylau
Copy link
Contributor Author

Passed my tests.

@Mego
Copy link
Owner

Mego commented Aug 24, 2016

Why on earth did you write a custom isqrt function? Surely int(n**.5+1) would be much faster.

@kckennylau
Copy link
Contributor Author

kckennylau commented Aug 24, 2016

I was worried about floating point inaccuracies... also, I believe sqrt(n) would be faster than n**.5. I do not believe that it would be "much faster" though, since the complexity of my isqrt function is still linear.

@kckennylau
Copy link
Contributor Author

And I do not think that this is a matter more urgent than the bugfix?

@Mego
Copy link
Owner

Mego commented Aug 24, 2016

I'll merge it, but I'm changing it back to math.sqrt. The native C code for the math library will certainly be faster than the Python code.

@Mego Mego merged commit 411abd3 into Mego:master Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants