-
Notifications
You must be signed in to change notification settings - Fork 131
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
Added GCD with tests #15
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 12 12
Lines 473 492 +19
=====================================
+ Hits 473 492 +19
Continue to review full report at Codecov.
|
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.
Some minor changes are required, after which it'll be good to merge 👍
include/BigInt.hpp
Outdated
@@ -93,7 +93,7 @@ class BigInt { | |||
// I/O stream operators: | |||
friend std::istream& operator>>(std::istream&, BigInt&); | |||
friend std::ostream& operator<<(std::ostream&, const BigInt&); | |||
|
|||
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.
Please remove the extra spaces so that this file's history isn't affected.
@@ -528,4 +528,6 @@ BigInt operator%(const std::string& lhs, const BigInt& rhs) { | |||
return BigInt(lhs) % rhs; | |||
} | |||
|
|||
|
|||
|
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.
Please remove the extra lines so that this file's history isn't affected.
include/functions/math.hpp
Outdated
/* | ||
Logic for handling negative case: | ||
|
||
gcd{a,b}=gcd{|a|,b}=gcd{a,|b|}=gcd{|a|,|b|} |
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 is well-known information and I don't think it needs to be described here.
Hi @faheel, |
There's still one left. Check the review above. |
Does it look good now? I will get started on LCM. |
Yes, it does. Thank you! |
Added test cases in math.test.cpp and corrected the friend function part as per PR review.
Relates to #5.