tests/testthat/test_logsum.R

# Tests "logsum" function
context("adding small probabilities")
library(dst)
test_that("logsum", {
  expect_equal(exp(logsum(log(1e-5),log(1e-5))),1e-5+1e-5)
})

Try the dst package in your browser

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

dst documentation built on Sept. 11, 2024, 7:05 p.m.