-
Notifications
You must be signed in to change notification settings - Fork 51
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
implement Sqrt() #104
implement Sqrt() #104
Conversation
Codecov Report
@@ Coverage Diff @@
## master #104 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 1364 1385 +21
=========================================
+ Hits 1364 1385 +21 |
for { | ||
z2 = z2.Div(x, z1) | ||
z2 = z2.Add(z2, z1) | ||
{ //z2 = z2.Rsh(z2, 1) -- the code below does a 1-bit rsh faster |
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.
There is DeepSource complain about this additional block.
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.
Yeah deepsource is nitpicky. "Unnecessary block detected" - hmpf.
Do you also think it should be removed? I personally like partitioning stuff like that sometimes, for clarity.
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.
I could move the a,b
definition inside this clause to make deepsource happy
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.
I could move the a,b definition inside this clause to make deepsource happy
This is good idea.
This PR implements
Sqrt
, and closes #100.