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

Maybe add half (16-bit float) support #7

Open
ulfjack opened this issue May 26, 2018 · 4 comments
Open

Maybe add half (16-bit float) support #7

ulfjack opened this issue May 26, 2018 · 4 comments
Labels
C Affects the C implementation in ryu/.

Comments

@ulfjack
Copy link
Owner

ulfjack commented May 26, 2018

TBD

@ulfjack
Copy link
Owner Author

ulfjack commented Aug 2, 2018

This is actually fairly easy - we can just reuse the 32-bit float computation. Except for the decoding, the code is independent of the original bit size. I've experimentally implemented 32-bit via the 64-bit conversion process and it passed all the tests.

@ulfjack
Copy link
Owner Author

ulfjack commented Aug 7, 2018

Alternatively, we can use the new generic API, which should cover everything up to and including 128-bit float.

@ulfjack
Copy link
Owner Author

ulfjack commented Aug 7, 2018

(Although not with quite the same level of performance.)

@ulfjack ulfjack added the C Affects the C implementation in ryu/. label Aug 7, 2018
@quinnj
Copy link

quinnj commented Aug 7, 2019

Just a note here that the Julia implementation supports Float16; supporting it was pretty straightforward, following the Float32/Float64 patterns, but I did end up porting the split-table generation code to Julia and we just generate the tables during module precompilation, in addition to generating the Float16 tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Affects the C implementation in ryu/.
Projects
None yet
Development

No branches or pull requests

2 participants