How to convert hex to float?

Hi! How to convert hex to float?

        var String output = "67|FA|40|48"
        var String[] bytes = output.split("\\|") // 67FA4048
        var Number r = Integer.parseInt(bytes.get(2) + bytes.get(3) + bytes.get(0) + bytes.get(1), 16).floatValue as Number
		logInfo("test", r.toString)

Result is 1.07848704E9

But right result on picture:
hex

First you must find out how your float is encoded. 7 bytes is unusual.

Encoded as CDAB, i used online converter to find out right result 3.13134623

Here is solution

var String parse = bytes.get(2) + bytes.get(3) + bytes.get(0) + bytes.get(1)
var int n = Integer.parseInt(parse, 16) 
var Float convert = Float.intBitsToFloat(n)