要注意,精度是以位数(digits)而不是以小数位(decimal places)表示,运算准确到28个小数位的最大值。 正如你所看到的,小数类型的取值范围比double的还窄,但它更精确。
基于6个网页-相关网页
然而,从第3行可以看到,Planning根据存储的数据进行计算,包括所有小数位,然后将结果以所请求的方式呈现给用户。
However, as can been seen from the third row, Planning calculates data based on the data held, including all decimal places and then presents the result to the user in the format requested.
但是对于事务过程的中间结果(如乘以利率)则可能需要更多小数位以保持准确度。
But for intermediate results during a transaction, such as multiplying by an interest rate, you might want additional decimal places to retain accuracy.
应用推荐