Pick better variable types
Change-Id: Ia4ba19744e23c20d9b6fb0e9d803bc00b415191f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133441 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
fa7e4ddb61
commit
57087dd194
1 changed files with 3 additions and 3 deletions
|
@ -584,16 +584,16 @@ double SAL_CALL AnalysisAddIn::getXnpv(
|
|||
aValList.Append( rValues );
|
||||
aDateList.Append( rDates );
|
||||
|
||||
sal_Int32 nNum = aValList.Count();
|
||||
sal_uInt32 nNum = aValList.Count();
|
||||
|
||||
if( nNum != sal_Int32( aDateList.Count() ) || nNum < 2 )
|
||||
if( nNum != aDateList.Count() || nNum < 2 )
|
||||
throw css::lang::IllegalArgumentException();
|
||||
|
||||
double fRet = 0.0;
|
||||
double fNull = aDateList.Get( 0 );
|
||||
fRate++;
|
||||
|
||||
for( sal_Int32 i = 0 ; i < nNum ; i++ )
|
||||
for( sal_uInt32 i = 0 ; i < nNum ; i++ )
|
||||
fRet += aValList.Get( i ) / ( pow( fRate, ( aDateList.Get( i ) - fNull ) / 365.0 ) );
|
||||
|
||||
RETURN_FINITE( fRet );
|
||||
|
|
Loading…
Reference in a new issue