Home > SPlaC v1_0 > Mie > GEN > GenCheckSum2Mat.m

GenCheckSum2Mat

PURPOSE ^

Check potential loss of precision during sum of two arrays (same dimensions)

SYNOPSIS ^

function sumret=GenCheckSum2Mat(ar1,ar2,sVar,sCaller)

DESCRIPTION ^

 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 sumret=ar1+ar2;
0002 
0003 global noCheckSum;
0004 if (isempty(noCheckSum) || ~noCheckSum)
0005     GenCheckSumNumPb(sumret,ar1,sVar,sCaller);
0006 end

This web page is part of the SPlaC package © 2008. Contact: Eric Le Ru
Generated on Wed 03-Dec-2008 11:10:14 by m2html © 2003 (adapted)