Understanding floating point precision

前端 未结 3 1673
情话喂你
情话喂你 2021-01-06 17:45

Is it the case that:

  1. Representable floating point values are densest in the real number line near zero?
  2. Representable floating point values grow spars
3条回答
  •  走了就别回头了
    2021-01-06 18:18

    Answers:

    1. Representable floating point values are densest in the real number line near zero? Yes
    2. Representable floating point values grow sparser (exponentially? Yes) as the number line moves away from zero? Yes
    3. If the above two are true, does that mean there is less precision farther from zero? Yes

    Overall question: Does precision in some way refer to or depend on the density of numbers you can represent (accurately)?

    See https://stackoverflow.com/a/24179424

    I also recommend What Every Computer Scientist Should Know About Floating Point Arithmetic

提交回复
热议问题