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

Support for calculations using a decimal type? #115

Open
tirithen opened this issue Nov 21, 2022 · 2 comments
Open

Support for calculations using a decimal type? #115

tirithen opened this issue Nov 21, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@tirithen
Copy link

I have been experimenting a bit with this crate for a project that I'm working on, and I wonder, is there a way to perform all calculations using a decimal numeric type, like rust_decimal or similar, rather than a floating point type?

This as some use cases needs to be able to guarantee the exact the precision of calculations.

@ISibboI ISibboI self-assigned this Nov 21, 2022
@ISibboI ISibboI added the enhancement New feature or request label Nov 21, 2022
@ISibboI
Copy link
Owner

ISibboI commented Nov 21, 2022

For now you would need make a fork and then alter the type alias for the decimal type. But I am planning to make the integer and decimal types generic at some point, see #111.
However, at the moment I don't have much time for this crate.

@tirithen
Copy link
Author

Thank you for the answer, I might give that a try.

It looks promising with being able to choose the decimal type at compile time as discussed in the other issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants