Applications using Decimal versus double . .

前端 未结 7 1479
感动是毒
感动是毒 2021-01-02 19:38

I wanted to see if folks were using decimal for financial applications instead of double. I have seen lots of folks using double all over the place with unintended conseque

7条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-02 20:23

    Yes, using float or double for financials is a common mistake, leading to much, much pain. decimal is the most obvious choice in this scenario.

    For general knowledge, a good discussion of each is here (float/double) and here (decimal).

提交回复
热议问题