如果我在 Windows(x86 和 x64)下的 .NET 上运行涉及 System.Double
的复杂计算,然后在 Mono(Linux、Unix 等)上运行,绝对有保证 以在所有情况下得到完全相同的结果,或者规范是否允许在计算中有一些回旋余地?
最佳答案
来自 MSDN
In addition, the loss of precision that results from arithmetic, assignment, and parsing operations with Double values may differ by platform. For example, the result of assigning a literal Double value may differ in the 32-bit and 64-bit versions of the .NET Framework
希望对您有所帮助。
关于c# - .NET “double” 算法是否独立于平台/体系结构?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5017530/