Decimal vs Double Speed

前端 未结 7 1071
暗喜
暗喜 2020-11-27 13:03

I write financial applications where I constantly battle the decision to use a double vs using a decimal.

All of my math works on numbers with no more than 5 decimal

7条回答
  •  鱼传尺愫
    2020-11-27 13:52

    Just use a long and multiply by a power of 10. After you're done, divide by the same power of 10.

提交回复
热议问题