Functions for computing "relative inverse" (x[1]/x).
Functions for computing "relative inverse" (x[1]/x).
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.
UTF-8
relInv(x)relInv2(x)
Arguments
x: A numeric vector. For relInv it should not contain 0s (while for relInv2 it can).
Returns
A vector computed as x[1]/x. For relInv2, if the non-finite elements are replaced with 0s.