Possible typo in the C source code of R

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Possible typo in the C source code of R

Martin Bodin
Good morning,

I am Martin Bodin, a postdoc at the CMM in Santiago de Chile, and I am
currently in the process of formalising (a part of) the R language into
the Coq proof assistant. This work makes me look frequently at the
source code of R.

I have noticed a strange line in the file src/main/util.c of the trunk
branch:
https://github.com/wch/r-source/blob/e42531eff56ee6582d7dc6a46f242af5447c633e/src/main/util.c#L70

The line 70 “REAL(x)[0] == REAL(x)[0]” doesn’t make any sense for me:
are we looking for NaN values here? I think that it should be
“REAL(x)[0] == REAL(y)[0]” instead (and the same applies for the next
two lines).

I didn’t searched for any R program that may be affected by this typo,
but I have the feeling that it may lead to unexpected behaviours.

From what I understood, the bug reporting tool for R is closed for
non-members, and I am thus sending this possible bug report in this
list. Please redirect me if I am not reporting in the right place.

Best regards,
Martin Bodin.



______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

signature.asc (849 bytes) Download Attachment