[英]How can I produce the exact decimal values
代码:
将 mp 调暗为十进制
mp = 2056834 / 36 MsgBox(mp, vbInformation)
Output:57134.2777777778
我期待 output 是:
Output:57134.27777777778
为什么它缺少小数点应该是什么问题?
尝试这个:
Dim mp As Decimal
mp = Math.Round(CDec(2056834) / CDec(36), 11)
MsgBox(mp, vbInformation)
这将产生预期的 output: 57134.27777777778
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.