Calling CreateDeviceEx as part of the hooking process is causing the floating point rounding state to change for some reason. Wrap the call in a pair of fegetround/fesetround