From mbodin at dim.uchile.cl  Wed Feb  7 16:12:10 2018
From: mbodin at dim.uchile.cl (Martin Bodin)
Date: Wed, 7 Feb 2018 12:12:10 -0300
Subject: [Rd] Possible typo in the C source code of R
Message-ID: <7faca923-dfd9-19f6-7cff-3289bb4f715e@dim.uchile.cl>

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.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20180207/a654ad87/attachment.sig>


[Rd] Possible typo in the C source code of R
Martin Bodin