tests/testthat/test-mvgamma.R

context("Multivariate Gamma function")

test_that("Comparison with gamma", {
  expect_equal(mvgamma(-1.5,1), gamma(-1.5))
  expect_equal(mvgamma(-2.5,1), gamma(-2.5))
})

test_that("Complex value for p=1", {
  y <- 2
  o1 <- Mod(mvgamma(y*1i,1))
  o2 <- sqrt(pi/y/sinh(pi*y))
  expect_equal(o1, o2)
})
stla/HypergeoMat3 documentation built on Nov. 5, 2019, 9:39 a.m.