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

Added sqrt function to sdk.Decimal type #5219

Merged
merged 9 commits into from
Oct 18, 2019
Merged

Added sqrt function to sdk.Decimal type #5219

merged 9 commits into from
Oct 18, 2019

Conversation

sunnya97
Copy link
Member

@sunnya97 sunnya97 commented Oct 18, 2019

Square Roots are a generally very useful mathematical operation that is present in most Number types and should be present in our custom Number type of sdk.Decimal. Some examples of things it is useful for include Proportional Slashing (#5211), quadratic voting, and other social choice theory procedures (see: https://arxiv.org/pdf/1809.06421.pdf).

  • Targeted PR against correct branch (see CONTRIBUTING.md)

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.

  • Wrote tests

  • Updated relevant documentation (docs/)

  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md

  • Re-reviewed Files changed in the github PR explorer


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@codecov
Copy link

codecov bot commented Oct 18, 2019

Codecov Report

Merging #5219 into master will increase coverage by 0.05%.
The diff coverage is 81.81%.

@@            Coverage Diff             @@
##           master    #5219      +/-   ##
==========================================
+ Coverage   53.43%   53.48%   +0.05%     
==========================================
  Files         290      290              
  Lines       17714    17725      +11     
==========================================
+ Hits         9465     9480      +15     
+ Misses       7510     7504       -6     
- Partials      739      741       +2

@alessio
Copy link
Contributor

alessio commented Oct 18, 2019

Can you include in the PR's description the rationale of this change please?

@sunnya97
Copy link
Member Author

sunnya97 commented Oct 18, 2019

Added

sunnya97 and others added 3 commits October 18, 2019 11:44
Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@alexanderbez alexanderbez merged commit d7a08ce into master Oct 18, 2019
@alexanderbez alexanderbez deleted the sunny/dec-sqrt branch October 18, 2019 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants