lnDiffErfs: Helper function for computing the log of difference

Description Usage Arguments Details Value Examples

View source: R/miscFunctions.R

Description

Helper function for computing the log of difference

Usage

1
  lnDiffErfs(x1, x2)

Arguments

x1

argument of the positive erf

x2

argument of the negative erf

Details

v <- lnDiffErfs(x1, x2) computes the log of the difference of two erfs in a numerically stable manner.

Value

v

list(c(log(abs(erf(x1) - erf(x2))), sign(erf(x1) - erf(x2))))

Examples

1
  lnDiffErfs(100, 10)

tigre documentation built on Nov. 8, 2020, 5:32 p.m.