Division and precision in c++

Started by
11 comments, last by Moomin 15 years, 9 months ago
Yup the problem is solved by setting that flag.
Thank you guys for the help :)
Advertisement
Quote:Original post by rip-off
I believe DirectX modifies the way the floating point processor works.


what the hell?!
I think Microsoft needs to get off their freaking power trip and back the f off
Quote:Original post by Funkymunky
what the hell?!
I think Microsoft needs to get off their freaking power trip and back the f off


I'm pretty sure they do it for a reason.

Quote:From msdn
D3DCREATE_FPU_PRESERVE
Forces Direct3D to not change the floating-point unit (FPU) control word, running the pipeline using the precision of the calling thread. Without this flag, Direct3D defaults to setting the FPU to single-precision round-to-nearest mode. Using this flag with the FPU in double-precision mode will reduce Direct3D performance.

Warning: Portions of Direct3D assume FPU exceptions are masked. Unmasking such exceptions may lead to undefined behavior.


So using the flag can have a performance hit and can lead to undefined behaviour. The reason they change the FPU mode seems to be for performance reasons so is more of a 'smart move' rather than 'power trip.'

This topic is closed to new replies.

Advertisement