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)
})

Try the HypergeoMat package in your browser

Any scripts or data that you put into this service are public.

HypergeoMat documentation built on Feb. 16, 2023, 7:40 p.m.