MCPcopy Create free account
hub / github.com/brimdata/super / EncodeFloat16

Function EncodeFloat16

primitive.go:108–111  ·  view source on GitHub ↗
(d float32)

Source from the content-addressed store, hash-verified

106}
107
108func EncodeFloat16(d float32) scode.Bytes {
109 var b [2]byte
110 return AppendFloat16(b[:0], d)
111}
112
113func DecodeFloat16(zb scode.Bytes) float32 {
114 return float16.Frombits(binary.LittleEndian.Uint16(zb)).Float32()

Callers 6

SerializeMethod · 0.92
encodeAnyMethod · 0.92
BuildPrimitiveFunction · 0.92
GenValueFunction · 0.92
buildScodeMethod · 0.92
BytesMethod · 0.85

Calls 1

AppendFloat16Function · 0.85

Tested by

no test coverage detected