When to use Fixed Point these days

前端 未结 7 2443
生来不讨喜
生来不讨喜 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:15

    In situations where you are dealing with very large amounts of data, fixed point can be twice as memory efficient, e.g. a four byte long integer as opposed to an eight byte double. A technique often used in large geospatial datasets is to reduce all the data to a common origin, such that the most significant bits can be disposed of, and work with fixed point integers for the rest. Floating point is only important if the point does actually float, i.e. you are dealing with a very wide range of numbers at very high accuracy.

提交回复
热议问题