Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.7k
feat: removetwinPrime
#1641
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat: removetwinPrime
#1641
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecov-commenter commentedMar 8, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## master #1641 +/- ##==========================================- Coverage 83.94% 83.92% -0.02%========================================== Files 377 376 -1 Lines 19727 19698 -29 Branches 2917 2911 -6 ==========================================- Hits 16559 16532 -27+ Misses 3168 3166 -2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This improves coverage of the existing implementation, but I think the existing implementation has a bug: According to Wikipedia
A twin prime is a prime number that is either 2 less or 2 more than another prime number
So the (a) twin prime of7
should be5
.
What should then be the I have to admit that I did not get this function is supposed to do. It would be more natural to have a function like |
I think either 3 or 7 would be fine. We may also remove this function entirely, or replace it with an "is twin prime" variant as you suggest, IMO. It's just confusing (and trivial) as is. |
I will remove it. |
* tests: add missing test of `twinPrime`* feat: remove `twinPrime`
Uh oh!
There was an error while loading.Please reload this page.
Describe your change:
This PR removes the function
twinPrime
as suggested in:#1641 (comment)This PR adds a test covering this line:JavaScript/Maths/TwinPrime.js
Line 23 in4a4ed57
And reorganizes existing tests.Checklist:
Example:
UserProfile.js
is allowed butuserprofile.js
,Userprofile.js
,user-Profile.js
,userProfile.js
are notFixes: #{$ISSUE_NO}
.