Export (0) Print
Expand All
Expand Minimize

/QIfist - Suppress _ftol (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This option suppresses the call of the helper function _ftol when a conversion from a floating-point type to an integral type is required.

/QIfist

Remarks

The /QIfist option is supported by x86 microprocessors only.

In addition to converting from a floating-point type to integral type, the _ftol function ensures the rounding mode of the floating-point unit (FPU) is toward zero (truncate), by setting bits 10 and 11 of the control word.

This guarantees that converting from a floating-point type to an integral type occurs as described by the ANSI C standard (the fractional portion of the number is discarded).

When using /QIfist, this guarantee no longer applies.

The rounding mode is one of four as documented in Intel reference manuals:

  • Round toward nearest (even number if equidistant)
  • Round toward negative infinity
  • Round toward positive infinity
  • Round toward zero

Using /QIfist can improve the performance of your application, but not without risk. Thoroughly test the portions of your code that are sensitive to rounding modes before relying upon code built with /QIfist in production environments.

Note   /QIfist is not in effect by default because the rounding bits also affect the floating-point to floating-point rounding that occurs after every calculation, so when you set the flags for C-style, toward-zero, rounding, your floating point calculations might be different. Do not use /QIfist if your code depends upon the expected behavior of truncating the fractional portion of the floating-point number. If you are unsure, do not use /QIfist.

See Also

Compiler Options


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft