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:
Stephan Bergmann 2022-04-26 14:46:44 +02:00
parent fa7e4ddb61
commit 57087dd194

View file

@ -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 );