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

16-bit float support #296

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

16-bit float support #296

wants to merge 20 commits into from

Conversation

dalle
Copy link
Collaborator

@dalle dalle commented Dec 4, 2024

Potential fix for issue #148
Augmenting initial work done in pull request #264

Still some issues remain.

  • One test is failing:
Checking data/ulfjack-ryu.txt
fesetround to FE_UPWARD
bad 16: 0000 33000000 3E60000000000000 2.98023223876953125E-8
parsed as 0x1p-24 (5.9604644775390625e-08)
as raw uint16_t, parsed = 1, expected = 0
fesetround: FE_UPWARD
  • Cleaning of code
  • More tests and cleaning up tests
  • Update readme

@dalle
Copy link
Collaborator Author

dalle commented Dec 4, 2024

I would argue that the test is incorrect, parsing 2.98023223876953125E-8 (0.0000000298023223876953125) is exactly halfway to 5.9604644775390625E-8 (0.0000000596046447753906250) and would round upwards for fesetround: FE_UPWARD.

@lemire
Copy link
Member

lemire commented Dec 4, 2024

@dalle Thanks. I will have a look shortly.

Note that I do not trust the tests that I had included. We need to validate.

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