michael@0: var bytes = [0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]; // big-endian michael@0: bytes.reverse(); // if testing on little-endian michael@0: var result = new Float64Array(new Uint8Array(bytes).buffer)[0]; michael@0: michael@0: // Check that this doesn't crash michael@0: isNaN(result + 0);