package ieee754

import (
	
	
	
)

// DecodeFloat32 decodes a float32 in IEEE 754 binary representation.
// See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#floating-point%E2%91%A2
func ( []byte) (float32, error) {
	if len() < 4 {
		return 0, io.ErrUnexpectedEOF
	}

	 := binary.LittleEndian.Uint32([:4])
	return math.Float32frombits(), nil
}

// DecodeFloat64 decodes a float64 in IEEE 754 binary representation.
// See https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/#floating-point%E2%91%A2
func ( []byte) (float64, error) {
	if len() < 8 {
		return 0, io.ErrUnexpectedEOF
	}

	 := binary.LittleEndian.Uint64()
	return math.Float64frombits(), nil
}