MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / DecodeUntaggedFloatValue

Function DecodeUntaggedFloatValue

pkg/util/encoding/encoding.go:2938–2945  ·  view source on GitHub ↗

DecodeUntaggedFloatValue decodes a value encoded by EncodeUntaggedFloatValue.

(b []byte)

Source from the content-addressed store, hash-verified

2936
2937// DecodeUntaggedFloatValue decodes a value encoded by EncodeUntaggedFloatValue.
2938func DecodeUntaggedFloatValue(b []byte) (remaining []byte, f float64, err error) {
2939 if len(b) < 8 {
2940 return b, 0, fmt.Errorf("float64 value should be exactly 8 bytes: %d", len(b))
2941 }
2942 var i uint64
2943 b, i, err = DecodeUint64Ascending(b)
2944 return b, math.Float64frombits(i), err
2945}
2946
2947// DecodeUntaggedFloat32Value decodes a value encoded by EncodeUntaggedFloat32Value.
2948func DecodeUntaggedFloat32Value(b []byte) (remaining []byte, f float32, err error) {

Callers 2

DecodeGeoInvertedKeyFunction · 0.85
DecodeFloatValueFunction · 0.85

Calls 2

DecodeUint64AscendingFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…