[Rd] Possible typo in the C source code of R
tomas.kalibera at gmail.com
Mon Feb 26 15:35:30 CET 2018
Thank you, Martin, for spotting this, it is clearly a bug, originally a
conformance check was intended here and time series were defined using
integers, so exact comparison would have made sense. Now time series are
defined using doubles and exact comparison could be too strict with
rounding errors. Moreover, it is not clear whether a conformance check
at this low-level is a good thing, so the check has been removed
completely, keeping the current behavior of R (except NaNs in the
On 02/07/2018 04:12 PM, Martin Bodin wrote:
> 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
> The line 70 “REAL(x) == REAL(x)” doesn’t make any sense for me:
> are we looking for NaN values here? I think that it should be
> “REAL(x) == REAL(y)” 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.
> R-devel at r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-devel