Float16_t really encoded on 16 bits?

hi,

looking at the raw buffer sizes and content of a single Float16_t leaf (with no range, no nbits),
it seems to me the Float16_t is actually encoded as a regular float (so 4bytes), not on 2bytes.

is this on purpose? (or a too-eager copy-paste from Double32_t?)


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


According to the code (it should be 12 ‘active’ bits for the mantissa and 8 for the exponent. Stored as char and a short … so actually 24 bits / 3 bytes where some of the bits have a fixed/constant value of 0.

If you see 4 bytes, then the interface used is not ‘catching’ the fact that it is a Float16_t

indeed.

I was confused by a few things.
most importantly was a typo (d instead of f).

also because Float16_t isn’t your usual “half_float”…

apologies for the noise.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.