When to use Fixed Point these days

前端 未结 7 2440
生来不讨喜
生来不讨喜 2021-02-18 13:25

For intense number-crunching i\'m considering using fixed point instead of floating point. Of course it\'ll matter how many bytes the fixed point type is in size, on what CPU i

7条回答
  •  有刺的猬
    2021-02-18 14:07

    Another good reason to use fixed decimal is that rounding is much simpler and predictable. Most of the financial software uses fixed point arbitrary precision decimals with half-even rounding to represent money.

提交回复
热议问题