Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid the use of SSE instructions (R)SQRTSS for sqrtf and 1/sqrtf.
When using the -ffast-math option, GCC uses SSE instructions SQRTSS for sqrtf and RSQRTSS for 1/sqrtf. This results in a loss of precision according to the GCC documentation: "the precision of the sequence can be decreased by up to 2 ulp (i.e. the inverse of 1.0 equals 0.99999994)". This loss of precision affects some games. Fixes the broken AI in Soldiers of Fortune.
- Loading branch information