Skip to content

Add 16-bit float data type #13626

@polyfractal

Description

@polyfractal

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. :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions