为什么160.34 x 6返回962.02而不是962.04? [英] Why does 160.34 x 6 return 962.02 and not 962.04?

查看:76
本文介绍了为什么160.34 x 6返回962.02而不是962.04?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将单位成本乘以百分比,然后将结果乘以数量,无法使计算结果达到我想要的精度。


我所有的字段都被描述作为具有2个十进制位置的标准数字,但看起来像是使用小数精度3计算扩展名。


我正在计算选择查询中的字段。

我已尝试一次性进行扩展计算,如成本*标记*数量,并将其拆分为2个计算字段。一个用于标记价格(calculatedunitprice = cost * markup)和一个用于扩展(calculatedunitprice * quantity),结果相同。

I am multiplying unit cost by a percentage and then multiplying that result by quantity and cannot get the calculations to come out to the precision I would like.

All my fields are described as standard numeric with 2decimal positions, but it looks like the extension is being calculated with a decimal precision of 3.

I''m calculating the fields in a select query.
I''ve tried doing the extended calculation all at once as in cost*markup*quantity and also splitting it into 2 calculated fields. One for the marked up price (calculatedunitprice=cost*markup) and one for the extension (calculatedunitprice*quantity)with the same results.

推荐答案

Kelly,你能发布吗?请问查询的SQL以及记录的各个相关字段的值,这是错误的。


PS。你也可以指定所有相关字段的字段类型。
Kelly, can you post the SQL of the query along with the values of the various involved fields for the record where this is going wrong please.

PS. Can you also specify the field types of all related fields too.


这里是查询背后的sql。

Here''s the sql behind the query.

展开 | 选择 | Wrap | 行号


请求的其他信息怎么样?没有这一切,我什么都没有。
How about the rest of the info requested? I have nothing without it all.


这篇关于为什么160.34 x 6返回962.02而不是962.04?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆