使用 /fp:precise /fp:source (Windows) 或者 –fp-model precise –fp-model source (Linux, Mac OS X) 能够显著提高浮点运算结果的准确性和可复制性, 同时降低对运算性能的影响.
进一步阅读信息
1) Dr. Martyn J. Corden, David Kreitzer: “Consistency of Floating-Point Results using the Intel? Compiler or Why doesn’t my application always give the same answer?” http://software.intel.com/en-us/articles/consistency-of-floating-point-results-using-the-intel-compiler/ 2) Microsoft Visual C++* Floating-Point Optimization: http://msdn2.microsoft.com/en-us/library/aa289157(vs.71).aspx 3) The Intel? C++ and Fortran Compiler User and Reference Guides, “Floating Point Operations” section. 4) “Floating Point Calculations and the ANSI C, C++ and Fortran Standard” http://www.intel.com/cd/software/products/asmo-na/eng/330130.htm or see the list at http://www.intel.com/cd/software/products/asmo-na/eng/330130.htm