Should we still support Octave's OLD_NA value?

Octave uses a specific value of the 64-bits in an IEEE double to indicate the value NA as separate from the value NaN.

However, at some point in the very distant past (@jwe might remember), we used a different pattern for the value NA. We maintain a definition of this old value in lo-ieee.h and every time a binary value is loaded from a file Octave checks whether that value is an old NA value and replaces it with the new pattern for NA.

When would it be appropriate to drop support for this feature?

The original intent of NA in Octave was to provide the same NA value and behavior as was used in R at the time so that binary values written to files could be shared between R and Octave. I also hoped that statistics functions in Octave might be modified to handle NA in the same way as R, but that never happened. I now wonder whether it is really necessary or desirable to have NA separate from NaN in Octave. Matlab doesn’t have the concept of NA as a separate thing from NaN and Octave doesn’t do much special with NA. We also don’t have a way to distinguish missing integer values. My feeling is we should deprecate NA and drop it from Octave.

I like this feature so I’ll go ahead and keep it up for a while. But, I will get rid of OLD_NA.

Are we still using the same binary representation for NA as R?

Yes, we are compatible with R.