The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ReciprocalArray


Unit:SDL_openarrays
Class: none
Declaration: [1] function ReciprocalArray (var Arr: TDoubleArray; Indefval: double): integer;
[2] function ReciprocalArray (var Arr: TDouble2DArray; Indefval: double): integer;
[3] function ReciprocalArray (var Arr: TDouble3DArray; Indefval: double): integer;
[4] function ReciprocalArray (var Arr: TDouble4DArray; Indefval: double): integer;

The function ReciprocalArray calculates the reciprocal value of each element of the array Arr. 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 ... Arr has zero size



Last Update: 2023-Feb-06