put halfFloat 12 of steve into bill
put the fifth halfFloat of steve into bill
The halfFloat
data type is a chunk type of binary
that represents an IEEE-format half-precision floating point number at a particular offset in the parent binary
.
The chunks of a binary
are numbered starting at zero. This is one of the very few instances of zero-based indexing in XION, as most indexes start at 1.
Accessing a halfFloat
chunk that is out of range returns zero
. Modifying a halfFloat
chunk that is out of range inserts as many zero bytes as necessary to insert data at the appropriate offset in the parent binary
.
The endianness of the halfFloat
is determined by the littleEndian
global property.
The half-precision format has one sign bit, 5 exponent bits, and 10 mantissa bits.