What uses do floating point NaN payloads have?

后端 未结 3 1653
一向
一向 2020-12-06 10:36

I know that IEEE 754 defines NaNs to have the following bitwise representation:

  • The sign bit can be either 0 or 1
  • The expone
3条回答
  •  抹茶落季
    2020-12-06 11:13

    The statistical environment R uses NaN payloads to distinguish one specific NaN as representing a statistical "missing value", which prints as NA. This allows 'missing' to propagate through numeric calculations -- although when combining a missing value with another NaN it is not predictable which one is propagated.

提交回复
热议问题