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 f16, f128 #3

Open
1 of 2 tasks
ExpHP opened this issue Jun 11, 2019 · 2 comments · Fixed by #69
Open
1 of 2 tasks

Support f16, f128 #3

ExpHP opened this issue Jun 11, 2019 · 2 comments · Fixed by #69
Labels
enhancement New feature or request

Comments

@ExpHP
Copy link
Owner

ExpHP commented Jun 11, 2019

numpy has float16 and float128 datatypes, which can appear in npy files.

There exists a crate called half for binary16-encoded floats.

@ExpHP ExpHP added the enhancement New feature or request label Jun 12, 2019
@ExpHP
Copy link
Owner Author

ExpHP commented Jul 13, 2019

Some more oddities: numpy/numpy#10288

Basically, float128 is not binary128 format. It is for 80-bit precision floats.

  • Supposedly there exists np.float96. I don't have this on my system.
  • The dtypes np.float96 and np.float128 both represent np.longdouble, just with different amounts of zero-padding. (float96 aligns to 32-bit boundaries, float128 aligns to 64-bit boundaries).

Also, I had no idea this was the case, but: Even my own system has 80-bit precision for long double!

> np.finfo(np.longdouble).eps
1.084202172485504434e-19

@ExpHP
Copy link
Owner Author

ExpHP commented Dec 3, 2023

Reopening because we still lack f128 support

@ExpHP ExpHP reopened this Dec 3, 2023
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

Successfully merging a pull request may close this issue.

1 participant