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

Simplify round, fix directed rounding #24

Merged
merged 15 commits into from
Jun 6, 2024
Merged

Simplify round, fix directed rounding #24

merged 15 commits into from
Jun 6, 2024

Conversation

awf
Copy link
Collaborator

@awf awf commented May 27, 2024

Simplifying definition of "round", plus bugfixes to handling of directed rounding modes.

This definition further emphasizes that gfloat is biased toward readability rather than speed - e.g. using log2 rather than frexp.

@awf awf changed the base branch from main to ival-to-code May 27, 2024 09:07
Base automatically changed from ival-to-code to main June 3, 2024 17:38
@awf awf changed the title Simplify round Simplify round, fix directed rounding Jun 4, 2024
@awf awf marked this pull request as ready for review June 4, 2024 10:48
@awf awf force-pushed the simplify-round branch from 2f45495 to 6e35def Compare June 5, 2024 13:31
@awf awf requested a review from scott-griffiths June 5, 2024 15:39
Copy link
Collaborator

@scott-griffiths scott-griffiths left a comment

Choose a reason for hiding this comment

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

LGTM, but I haven't used some of the IEEE-only rounding modes myself so I only checked that the logic looked reasonable and didn't attempt to compare with the standard.

src/gfloat/round.py Show resolved Hide resolved
src/gfloat/round.py Show resolved Hide resolved
@awf awf merged commit aea875d into main Jun 6, 2024
1 check passed
@awf awf deleted the simplify-round branch June 6, 2024 12:51
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