The ut_round() function rounds differently from SAS
alexhomel opened this issue · comments
Alex Homel commented
Description
The ut_round()
function produces unexpected results with options(tplyr.IBMRounding = TRUE)
.
Lines 313 to 321 in 6876054
Steps to Reproduce
Let's count the mean using a test vector and round it to 3 decimals using ut_round()
:
> vec <- c(2.64, -3.20, -2.88, 2.95)
> mvec <- mean(vec)
> mvec
[1] -0.1225
> ut_round(mvec, 3)
[1] -0.122
The expected value is -0.123 but I'm getting -0.122
Michael Stackhouse commented
Closed via #126