Skip to content
Prev 13895 / 398502 Next

binary coding of NA, Nan etc.

Prof Brian Ripley wrote:

            
I have no real knowledge of binary representation of these 'special'
numbers.
I was naively thinking a limited set of conventions were used by the
majority of the software/libraries. In this context having parameters
about endianess and type (as it is already the case for the actual
readBin and writeBin) plus the 'convention' (like IEEE-754 may be is).
For R things would remain the same, this would just be a choice in
encoding NA and friends on output (or input).

In my example I saw it as:


double:
	Java_representation (this is always 'big' endianess... a good thing
with java binary representation):
	0xef7f ffff ffff ffff

	IEEE-754
	0xffwhatever_it_is

and so on...

float:
	...and on...


But as you suggested things are (unfortunately) not that simple... I
guess for some type, NA and friends might be undefined...




I guess what I only have left to do is to wish everybody a good week-end
and run home....



Regards,




Laurent