-
Notifications
You must be signed in to change notification settings - Fork 623
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
Add Copy func #123
Add Copy func #123
Conversation
Sorry for answering so late (over 2 years XD) |
remove redundant changes
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.
Looks good :3
@@ -1553,7 +1553,7 @@ func (d Decimal) Sin() Decimal { | |||
sign = !sign | |||
j -= 4 | |||
} | |||
z := d.Sub(y.Mul(PI4A)).Sub(y.Mul(PI4B)).Sub(y.Mul(PI4C)) // Extended precision modular arithmetic | |||
z := d.Sub(y.Mul(PI4A)).Sub(y.Mul(PI4B)).Sub(y.Mul(PI4C)) // Extended precision modular arithmetic |
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.
Could you revert this line? If this is gofmt issue, I will address this in separate PR.
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.
Yes, I trying to revert it right now
decimal.go
Outdated
@@ -1684,3 +1683,15 @@ func (d Decimal) Tan() Decimal { | |||
} | |||
return y | |||
} | |||
|
|||
// Copy makes instance of d with same value and different pointer. | |||
// |
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.
nitpick: I think this line is unnecessary :D
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 agree
Useless comment line removed
I've resolved conflicts and now it is ready to merge |
Or may be it will be better to create a new PR from the current master? |
You can try to create a new PR if you have time. Thanks to that we would get rid of those format issues. :D |
Any news on this? |
I don't want to take credits from @habuvo for creating this PR, but still, linting problems are not resolved. So I not gonna merge it to the main branch. |
I decided to merge this PR in the current state and fix all the issues I spotted afterwards, as I don't want to take any credits from @habuvo for this PR |
There is need to make independence copy of Decimal in any cases. I think it's better have special function for it due to clean code.