当浮点数从一种表示形式转换为另一种表示形式时,该数字的最低有效位数可能稍有变化。
When a floating point number is converted from one representation to another representation, the least significant digits of that number may vary slightly.
由于这些变化,逻辑上相等的数字其最低有效位数可能会发生变化,从而导致它们具有不同的值。
Because of these changes, Numbers that would logically be equal may have changes in their least-significant digits that cause them to have different values.
若要使用相等比较来解决这些问题,请考虑对您的应用程序进行编码,以便忽略最低有效位数的变化。
To work around problems with equality comparison, consider coding your application so that variations in the least significant digits are ignored.
应用推荐