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

前端 未结 7 1169
余生分开走
余生分开走 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.

    0 讨论(0)
提交回复
热议问题