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

Round instead of truncating in UD60x18 "mul" #7

Closed
PaulRBerg opened this issue Apr 11, 2021 · 2 comments
Closed

Round instead of truncating in UD60x18 "mul" #7

PaulRBerg opened this issue Apr 11, 2021 · 2 comments

Comments

@PaulRBerg
Copy link
Owner

This would give better precision when multiplying two fixed-point numbers.

@PaulRBerg PaulRBerg changed the title Round instead of truncate in "mulDiv" Round instead of truncate in UD60x18 "mul" Apr 11, 2021
@PaulRBerg
Copy link
Owner Author

Implemented in 3d66a2d.

@PaulRBerg PaulRBerg changed the title Round instead of truncate in UD60x18 "mul" Round instead of truncating in UD60x18 "mul" Nov 25, 2022
@PaulRBerg
Copy link
Owner Author

Update: since V3.0.0, PRBMath truncates instead of rounding up in mul. See #126 (comment).

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

No branches or pull requests

1 participant