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

Unify rounding modes #173

Open
desmonddak opened this issue Feb 10, 2025 · 0 comments
Open

Unify rounding modes #173

desmonddak opened this issue Feb 10, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@desmonddak
Copy link
Contributor

Motivation

It would be nice to have the same options for rounding for both fixed and float operations by using our enum for rounding modes.
Right now we have ofDouble and ofDoubleUnrounded for the floating point type, and just ofDouble for the fixed-point.

Desired solution

Floating and fixed-point should have a parallel API that passes in the type of rounding.

Also, the other rounding modes need implementation. Right now we have truncation and RNE supported in various places, both on the Logic side as well as the value side. These should all be combed out so they are parallel and uniform to lead to a least-surprise API.

We are working on a refactoring of the FPV API to remove some of the boilerplate and factory constructors, but this feature could be added after that is complete to help further simplify the API on the value side.

Alternatives considered

No response

Additional details

No response

@desmonddak desmonddak added the enhancement New feature or request label Feb 10, 2025
@desmonddak desmonddak mentioned this issue Feb 10, 2025
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

1 participant