[Rd] rounding change

Therneau, Terry M., Ph.D. therne@u @end|ng |rom m@yo@edu
Thu Mar 5 14:54:32 CET 2020


This is a small heads up for package maintainers.   Under the more recent R-devel, R CMD 
check turned up some changes in the *.out files.   The simple demonstration is to type  
"round(51/80, 3)", which gives .638 under the old and .637 under the new.   (One of my 
coxph test cases has a concordance of exactly 51/80).

In this particular case 51/80 is exactly .63750000, but that value does not have an exact 
representation in base 2.  The line below would argue that the new version is correct, at 
least with respect to the internal representation.

 > print(51/80, digits = 20)
[1] 0.63749999999999995559

This is not a bug or problem, it just means that whichever version I put into my 
survival/tests/book6.Rout.save file, one of R-devel or R-current will flag an issue.



	[[alternative HTML version deleted]]



More information about the R-devel mailing list