Skip to content

Commit c550759

Browse files
committed
Revisit test update for qnorm change via lower tolerance
1 parent 54a7416 commit c550759

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2023-03-26 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/tinytest/test_stats.R: Revisit change from PR #1252; we now
4+
use a slightly smaller tolerance to accomodate old and new value
5+
16
2023-03-25 Iñaki Ucar <[email protected]>
27

38
* R/Attributes.R: Switch to system2 to be able to capture stderr on error

inst/tinytest/test_stats.R

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,9 @@ expect_equal(runit_qnorm_log(c(-Inf, 0, 0.1)),
243243
list(lower = c(-Inf, Inf, NaN),
244244
upper = c(Inf, -Inf, NaN)),
245245
info = "stats.qnorm" )
246-
if (getRversion() >= "4.3.0") { # newer high-precision code in R 4.3.0
247-
expect_equal(runit_qnorm_log(-1e5)$lower, -447.197893678525)
248-
} else { # older pre-R 4.3.0 value
249-
expect_equal(runit_qnorm_log(-1e5)$lower, -447.1974945)
250-
}
246+
## newer high-precision code in R 4.3.0 has slightly different value
247+
## of -447.197893678525 so lowering tolerance a little
248+
expect_equal(runit_qnorm_log(-1e5)$lower, -447.1974945, tolerance=1e-6)
251249

252250
# test.stats.qpois.prob <- function( ) {
253251
vv <- seq(0, 1, by = 0.1)

0 commit comments

Comments
 (0)