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

Adding fraction math to allocated score #303

Merged
merged 2 commits into from
Jun 26, 2023
Merged

Conversation

mikefranze
Copy link
Collaborator

Description

Adds fractional math to allocated score. Because of normalized scores and ballot weights there's a lot of non integer math involved where precision can be an issue and ties can be hard to determine. This converts most of the internal data types to fractions which gets around floating point precision issues. All outputs are converted back to floating point.

Related Issues

Equal-Vote/starpy#23

@mikefranze mikefranze requested a review from ArendPeter June 25, 2023 20:02
Copy link
Member

@ArendPeter ArendPeter left a comment

Choose a reason for hiding this comment

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

Looks good!

I didn't review super closely but if the tests passed then I trust it

@mikefranze mikefranze merged commit e33a15e into Equal-Vote:main Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants