## Low precision (eps, delta) values as "e.g." in Ding(94): ------------------
## Compare with Table 3 of Baharev_et_al 2017 %% ===> ./qbBaha2017.Rd <<<<<<<<<<<
aa <- c(0.5, 1, 1.5, 2, 2.5, 3, 5, 10, 25)
bb <- c(1:15, 10*c(2:5, 10, 25, 50))
utime <-
qbet <- matrix(NA_real_, length(aa), length(bb),
dimnames = list(a = formatC(aa), b = formatC(bb)))
(doExtras <- DPQmpfr:::doExtras())
if(doExtras) qbetL <- utimeL <- utime
p <- 0.95
delta <- 1e-4
eps <- 1e-6
system.t.usr <- function(expr)
system.time(gcFirst = FALSE, expr)[["user.self"]]
system.time(
for(ia in seq_along(aa)) {
a <- aa[ia]; cat("\n--==--\na=",a,":\n")
for(ib in seq_along(bb)) {
b <- bb[ib]; cat("\n>> b=",b,"\n")
utime [ia, ib] <- system.t.usr(
qbet[ia, ib] <- qbetaD94(p, a, b, ncp = 0, delta=delta, eps=eps, verbose = 2))
if(doExtras)
utimeL[ia, ib] <- system.t.usr(
qbetL[ia, ib] <- qbetaD94(p, a, b, ncp = 0, delta=delta, eps=eps,
verbose = 2, log_scale=TRUE))
}
cat("\n")
}
)# system.time(.): ~ 1 sec (lynne i7-7700T, Fedora 32, 2020)
sum(print(table(round(1000*utime)))) # lynne .. :
## 0 1 2 3 4 5 6 7 8 9 10 11 14 15 16 29
## 53 94 15 3 3 12 2 2 2 2 1 2 3 1 2 1
## [1] 198
if(doExtras) print(sum(print(table(round(1000*utimeL))))) # lynne .. :
Run the code above in your browser using DataLab