https://github.com/cran/pracma
Tip revision: 85eeff77b2e878cc9dbd7659e4acbc035be93c28 authored by Hans W. Borchers on 22 September 2022, 13:50:02 UTC
version 2.4.2
version 2.4.2
Tip revision: 85eeff7
polyint.R
###
### polyint.R +++ Test suite +++
###
test.polyint <- function(input, expected) {
output <- do.call(getFromNamespace("polyint", "pracma"), input)
identical(output, expected)
}
polyint.expected.1 <- c(1, 0)
polyint.expected.2 <- c(1/6, 1/5, 1/4, 1/3, 1/2, 1, 1)
test.polyint(list(p=c(1)), polyint.expected.1)
test.polyint(list(p=c(1,1,1,1,1,1), k=1), polyint.expected.2)