A quick and rough skim lead me to this quick and lazy fix. In short , IEEE 754 single-precision float is not precise enough for storing every int32 value, and you need double for that ;)
BTW, should there be a default case for the switch ((op >> 21) & 0x1f) right following below or dsv could be uninitialized?