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

Add 16-bit float data type #13626

Closed
polyfractal opened this issue Sep 16, 2015 · 3 comments
Closed

Add 16-bit float data type #13626

polyfractal opened this issue Sep 16, 2015 · 3 comments

Comments

@polyfractal
Copy link
Contributor

Sometimes you just want fewer bits :)

Would be great if we supported half-precision 16 bit floats. Robert mentioned that Java doesn't support these newer floats yet, so we'd have to do the conversion in software. But perhaps someday Java will support it and we can switch over to the intrinsics.

Quoting wiki:

The minimum strictly positive (subnormal) value is 2−24 ≈ 5.96 × 10−8. The minimum positive normal value is 2−14 ≈ 6.10 × 10−5. The maximum representable value is (2−2−10) × 215 = 65504.

Half-floats would mainly be useful for doc-value metrics that don't need the fully 32bit float, but need a larger dynamic range than an equivalent fixed-point (#13625)

Usual disclaimer about floating point accuracy issues applies, although it is noticed much sooner due to the limited range. :)

@jpountz
Copy link
Contributor

jpountz commented Sep 25, 2015

+1

@jpountz
Copy link
Contributor

jpountz commented May 19, 2016

I have been playing with it at https://issues.apache.org/jira/browse/LUCENE-7289.

@polyfractal
Copy link
Contributor Author

Closed via #18887 (Yay!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants