Check potential loss of precision during sum of two arrays (same dimensions) See the supplementary information for a discussion of loss of precision. Returns the sum of the two arrays (ar1+ar2). A warning is issued if numerical problems are encountered (see GenCheckSumNumPb for more details). No check is performed if the global variable noCheckSum is defined and equal to true. Parameters: - ar1: scalar, vector, or matrix - ar2: scalar, vector, or matrix (same dimension as ar1) - sVar: string describing the variable that is being calculated - sCaller: string describing the function in which the calculation is performed Returns: ar1+ar2 This file is part of the SPlaC v1.0 package (copyright 2008) Check the README file for further information
0001 sumret=ar1+ar2; 0002 0003 global noCheckSum; 0004 if (isempty(noCheckSum) || ~noCheckSum) 0005 GenCheckSumNumPb(sumret,ar1,sVar,sCaller); 0006 end