MCPcopy Create free account
hub / github.com/PostHog/duckgres / decodeFloat8

Function decodeFloat8

server/types.go:949–955  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

947}
948
949func decodeFloat8(data []byte) (float64, error) {
950 if len(data) < 8 {
951 return 0, fmt.Errorf("insufficient data for float8: got %d bytes, need 8", len(data))
952 }
953 bits := binary.BigEndian.Uint64(data)
954 return math.Float64frombits(bits), nil
955}
956
957func decodeDate(data []byte) (time.Time, error) {
958 if len(data) < 4 {

Callers 3

TestDecodeFloat8Function · 0.85
decodeBinaryCopyFunction · 0.85
decodeBinaryFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestDecodeFloat8Function · 0.68