Recently I have used hexadecimal numbers in GNU R. The way they are parsed surprised me and is inconsistent with Java. As R Language Definition pdf only briefly mentions hexadecimal numbers here is what I have found.
First I have checked the following code:
I seemed that GNU R drops the decimal point. So I have checked notation with exponent being power of 2 (as in Java):
Now decimal point is correctly taken into account so I have checked further.
In the notation without exponent part GNU R just discards decimal points as in this example:
However, in notation with exponent last decimal point is taken into consideration and all earlier decimal points are ignored:
In summary – handling of hexadecimal literals in GNU R is nonstandard and at least for me – unexpected.