relInv: Functions for computing "relative inverse" (x[1]/x).
Description
For a vector x, it computes x[1]/x. For relInv2, if certain elements of the result are not finite (e.g. if certain elements of x are 0), these elements are replaced with 0s.
Usage
relInv(x)
relInv2(x)
Value
A vector computed as x[1]/x. For relInv2, if the non-finite elements are replaced with 0s.
Arguments
x
A numeric vector. For relInv it should not contain 0s (while for relInv2 it can).