DecodeUntaggedFloatValue decodes a value encoded by EncodeUntaggedFloatValue.
(b []byte)
| 2936 | |
| 2937 | // DecodeUntaggedFloatValue decodes a value encoded by EncodeUntaggedFloatValue. |
| 2938 | func 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. |
| 2948 | func DecodeUntaggedFloat32Value(b []byte) (remaining []byte, f float32, err error) { |
no test coverage detected
searching dependent graphs…