我遇到了Bigdecimal乘法问题.我有一栏:
t.decimal "average_price", precision: 8, scale: 2
Run Code Online (Sandbox Code Playgroud)
我的样本average_price看起来像"3.59280368".当我尝试使用此值进行一些计算时,我得到:
@itam.average_price * 1000000 = 3590000
Run Code Online (Sandbox Code Playgroud)
为什么不3592803呢?