How to alter a float by its smallest increment (or close to it)?

前端 未结 7 1195
余生分开走
余生分开走 2020-11-30 02:05

I have a double value f and would like a way to nudge it very slightly larger (or smaller) to get a new value that will be as close as possible to

7条回答
  •  粉色の甜心
    2020-11-30 02:55

    For what it's worth, the value for which standard ++ incrementing ceases to function is 9,007,199,254,740,992.

提交回复
热议问题