Floating point and decimal Numbers are not nearly as well-behaved as integers, and you cannot assume that floating point calculations that "should" have integer or exact results actually do.
浮点数和小数不象整数一样“循规蹈矩”,不能假定浮点计算一定产生整型或精确的结果,虽然它们的确“应该”那样做。
The standard mathematical operators, +, -, /, * are supported on both integer and floating point values, and you can mix and match floating-point and integers in calculations.
在整数和浮点数上,都支持使用标准的数学操作符(+、-、/ 和 *),可以在算式中混合使用浮点数和整数。
应用推荐