rec.prot {cwhmath}R Documentation

Protected division

Description

1/x, but 1/0 -> 0

Usage

  rec.prot(x, eps = .Machine$double.eps)

Arguments

x array to invert.
eps limit: if abs(x) < eps then 1/x -> 0.

Author(s)

Christian W. Hoffmann, christian.hoffmann@wsl.ch,
http://www.wsl.ch/staff/christian.hoffmann

Examples

  rec.prot(c(0,.Machine$double.eps,1.0e-10,1,1.0e100))
  rec.prot(c(0,.Machine$double.eps,1.0e-10,1,1.0e100), 100*.Machine$double.eps)

[Package cwhmath version 1.0.4 Index]