DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


ReciprocalVector

Declaration: ReciprocalVector (var Vec: TDoubleArray; IndefVal: double): integer;
The function ReciprocalVector calculates the reciprocal value of each element of the array Vec. The parameter IndefVal controls which value is used instead of the reciprocal if the original value is zero.

The function returns the following error codes:

 0 ... everything is OK
-1 ... Vec has zero size