R/glog.R

Defines functions inv.glog2 inv.glog10 inv.glog glog2 glog10 glog

Documented in glog glog10 glog2 inv.glog inv.glog10 inv.glog2

## compute "generalized log" = asinh
glog <- function(x, base = exp(1)){
  log(x + sqrt(x^2 + 1), base = base) - log(2, base = base)
}
glog10 <- function(x){ glog(x, base = 10) }
glog2 <- function(x){ glog(x, base = 2) }
inv.glog <- function(x, base = exp(1)){
  sinh(log(base)*x + log(2))
}
inv.glog10 <- function(x){ inv.glog(x, base = 10) }
inv.glog2 <- function(x){ inv.glog(x, base = 2) }
stamats/MKdescr documentation built on Feb. 24, 2024, 2:11 p.m.