tests/expm.r

library(libexpm)

n <- 250
n <- 10
x <- matrix(rnorm(n*n), n, n)

t1 <- system.time(exp1 <- expm(x))[3]

library(Matrix)
t2 <- system.time(exp2 <- Matrix::expm(x))[3]

t1
t2

all.equal(exp1, as.matrix(exp2), check.attributes=FALSE)
wrathematics/libexpm documentation built on May 4, 2019, 9:52 a.m.