From berw|n@tur|@ch @end|ng |rom gm@||@com  Sat Feb  8 09:27:07 2020
From: berw|n@tur|@ch @end|ng |rom gm@||@com (Berwin A Turlach)
Date: Sat, 8 Feb 2020 16:27:07 +0800
Subject: [Rd] Development version of R fails tests and is not installed
Message-ID: <20200208162707.04cc63d2@ECM-DTC-716.uniwa.uwa.edu.au>

G'day all,

I have daily scripts running to install the patched version of the
current R version and the development version of R on my linux box
(Ubuntu 18.04.4 LTS).

The last development version that was successfully compiled and
installed was "R Under development (unstable) (2020-01-25 r77715)" on
27 January.  Since then the script always fails as a regression test
seems to fail.  Specifically, in the tests/ subdirectory of my build
directory I have a file reg-tests-1d.Rout.fail which ends with:

> ## more than half of the above were rounded *down* in R <= 3.6.x
> ## Some "wrong" test cases from CRAN packages (partly relying on wrong R <= 3.6.x behavior) 
> stopifnot(exprs = {
+     all.equal(round(10.7775, digits=3), 10.778, tolerance = 1e-12) # even tol=0, was 10.777
+     all.equal(round(12345 / 1000,   2), 12.35 , tolerance = 1e-12) # even tol=0, was 12.34 in Rd
+     all.equal(round(9.18665, 4),        9.1866, tolerance = 1e-12) # even tol=0, was  9.1867
+ })
Error: round(10.7775, digits = 3) and 10.778 are not equal:
  Mean relative difference: 9.27902e-05
Execution halted

This happens while the 32bit architecture is installed,  which is a bit
surprising as I get the following results for the last installed
version of R's development version:

R Under development (unstable) (2020-01-25 r77715) -- "Unsuffered Consequences" 
Copyright (C) 2020 The R Foundation for Statistical Computing 
Platform: x86_64-pc-linux-gnu/32 (32-bit)
[...]
> round(10.7775, digits=3)
[1] 10.778

and

R Under development (unstable) (2020-01-25 r77715) -- "Unsuffered Consequences" 
Copyright (C) 2020 The R Foundation for Statistical Computing 
Platform: x86_64-pc-linux-gnu/64 (64-bit) 
[...]
> round(10.7775, digits=3)
[1] 10.778


On the other hand, the R 3.6.2 version, that I mainly use at the moment,
gives the following results:

R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu/32 (32-bit)
[...]
> round(10.7775, digits=3)
[1] 10.777

and

R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu/64 (64-bit)
[...]
> round(10.7775, digits=3)
[1] 10.777


So it seems as if the behaviour of round() has changed between R 3.6.2
and the development version.  But I do not understand why this test all
of a sudden failed if the results from the last successfully installed
development version of R suggest that the test should be passed.

Thanks in advance for any insight and tips.

Cheers,

	Berwin



[Rd] Development version of R fails tests and is not installed
Berwin A Turlach