Decode a float (JavaScript)

function decodeFloat(encoded) {
    const MS = (encoded & (2**1-1) << 15) >> 15
    const MV = (encoded & (2**9-1) << 6) >> 6
    const ES = (encoded & (2**1-1) << 5) >> 5
    const EV = encoded & (2**5-1)
    return (MS*-2+1) * MV * 2**(-9+(ES*-2+1)*EV)
}
// usage:
// > decodeFloat(0x3f05)
//  < 15.75
// > decodeFloat(0b11111100000101)
//  < 15.75