Problem converting from int to float

前端 未结 6 1826
[愿得一人]
[愿得一人] 2021-01-02 00:27

There is a strange behavior I cannot understand. Agreed that float point number are approximations, so even operations that are obviously returning a number without decimal

6条回答
  •  借酒劲吻你
    2021-01-02 00:49

    Mark's answer is correct in that it is the conversion between nativefloat and float32/float64.

    This is covered in the CLR ECMA spec but David Notario explains this far better than I could.

提交回复
热议问题