That function works for me with examples from https://en.wikipedia.org/wiki/Single-precision_floating-point_format
[{"id":"f64c029.2c5838","type":"function","z":"2ae8b25a.bffaa6","name":"Bytes to float","func":"let bytes = Number(msg.payload);\nmsg.payload = Bytes2Float32(bytes)\nreturn msg;\n\nfunction Bytes2Float32(bytes) {\n var sign = (bytes & 0x80000000) ? -1 : 1;\n var exponent = ((bytes >> 23) & 0xFF) - 127;\n var significand = (bytes & ~(-1 << 23));\n\n if (exponent == 128) \n return sign * ((significand) ? Number.NaN : Number.POSITIVE_INFINITY);\n\n if (exponent == -127) {\n if (significand === 0) return sign * 0.0;\n exponent = -126;\n significand /= (1 << 22);\n } else significand = (significand | (1 << 23)) / (1 << 23);\n\n return sign * significand * Math.pow(2, exponent);\n}","outputs":1,"noerr":0,"x":310,"y":612,"wires":[["6e888b6a.40c874"]]},{"id":"6e888b6a.40c874","type":"debug","z":"2ae8b25a.bffaa6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":502,"y":612,"wires":[]},{"id":"2dc3b0d4.06517","type":"inject","z":"2ae8b25a.bffaa6","name":"1","topic":"","payload":"0x3f800000","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":89,"y":614,"wires":[["f64c029.2c5838"]]},{"id":"43e54f8e.0cf598","type":"inject","z":"2ae8b25a.bffaa6","name":"-2","topic":"","payload":"0xc0000000","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":84,"y":650,"wires":[["f64c029.2c5838"]]},{"id":"a8fc7865.b2a438","type":"inject","z":"2ae8b25a.bffaa6","name":"Pi","topic":"","payload":"0x40490fdb","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":82,"y":684,"wires":[["f64c029.2c5838"]]}]