LibreOffice Module sc (master)  1
Macros | Variables
opinlinefun_finacial.cxx File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SC_OPENCL_OPINLINFUN_finacial
 
#define SC_OPENCL_OPINLINFUN_finacial
 

Variables

std::string nCorrValDecl
 
std::string SCdEpsilonDecl
 
std::string RoundDecl = "double Round(double fValue);\n"
 
std::string Round
 
std::string GetPMTDecl
 
std::string GetPMT
 
std::string GetPMT_newDecl
 
std::string GetPMT_new
 
std::string GetFVDecl
 
std::string GetFV
 
std::string GetFV_newDecl
 
std::string GetFV_new
 
std::string IsLeapYearDecl
 
std::string IsLeapYear
 
std::string DaysInMonthDecl
 
std::string DaysInMonth
 
std::string DaysInMonth_newDecl
 
std::string DaysInMonth_new
 
std::string DaysToDateDecl
 
std::string DaysToDate
 
std::string DateToDaysDecl
 
std::string DateToDays
 
std::string DateToDays_newDecl
 
std::string DateToDays_new
 
std::string GetNullDateDecl
 
std::string GetNullDate
 
std::string GetNullDate_newDecl
 
std::string GetNullDate_new
 
std::string ScaDateDecl
 
std::string ScaDate
 
std::string ScaDate2Decl
 
std::string ScaDate2
 
std::string lcl_GetCouppcdDecl
 
std::string lcl_GetCouppcd
 
std::string lcl_GetCoupncdDecl
 
std::string lcl_GetCoupncd
 
std::string addMonthsDecl
 
std::string addMonths
 
std::string getDaysInMonthRangeDecl
 
std::string getDaysInMonthRange
 
std::string GetDaysInYearsDecl
 
std::string GetDaysInYears
 
std::string GetDaysInYearDecl
 
std::string GetDaysInYear
 
std::string getDaysInYearRangeDecl
 
std::string getDaysInYearRange
 
std::string getDiffDecl
 
std::string getDiff
 
std::string lcl_GetcoupdaybsDecl
 
std::string lcl_Getcoupdaybs
 
std::string lcl_Getcoupdaybs_newDecl
 
std::string lcl_Getcoupdaybs_new
 
std::string lcl_GetcoupdaysDecl
 
std::string lcl_Getcoupdays
 
std::string lcl_Getcoupdays_newDecl
 
std::string lcl_Getcoupdays_new
 
std::string lcl_GetcoupnumDecl
 
std::string lcl_Getcoupnum
 
std::string lcl_Getcoupnum_newDecl
 
std::string lcl_Getcoupnum_new
 
std::string setDayDecl
 
std::string setDay
 
std::string coupdaysDecl
 
std::string coupdays
 
std::string coupdays_newDecl
 
std::string coupdays_new
 
std::string coupdaybsDecl
 
std::string coupdaybs
 
std::string coupdaybs_newDecl
 
std::string coupdaybs_new
 
std::string coupdaysncDecl
 
std::string coupdaysnc
 
std::string coupdaysnc_newDecl
 
std::string coupdaysnc_new
 
std::string checklessthanDecl
 
std::string checklessthan
 
std::string coupnumDecl
 
std::string coupnum
 
std::string coupnum_newDecl
 
std::string coupnum_new
 
std::string getPrice_Decl
 
std::string getPrice_
 
std::string getPrice_new_Decl
 
std::string getPrice_new
 
std::string getYield_Decl
 
std::string getYield_
 
std::string GetYearFracDecl
 
std::string GetYearFrac
 
std::string GetYieldmatDecl
 
std::string GetYieldmat
 
std::string GetDiffDateDecl
 
std::string GetDiffDate
 
std::string GetYearDiffDecl
 
std::string GetYearDiff
 
std::string GetDiffDate360_Decl
 
std::string GetDiffDate360_
 
std::string GetDiffDate360Decl
 
std::string GetDiffDate360
 
std::string GetDurationDecl
 
std::string GetDuration
 
std::string GetDuration_newDecl
 
std::string GetDuration_new
 
std::string ScGetDDBDecl
 
std::string ScGetDDB
 
std::string DblMinDecl
 
std::string DblMin
 
std::string ScInterVDBDecl
 
std::string ScInterVDB
 
std::string VDBImplementDecl
 
std::string VDBImplement
 
std::string GetOddlpriceDecl
 
std::string GetOddlprice
 
std::string GetOddlyieldDecl
 
std::string GetOddlyield
 
std::string GetYearFrac_newDecl
 
std::string GetYearFrac_new
 
std::string DaysToDate_newDecl
 
std::string DaysToDate_new
 
std::string DaysToDate_LocalBarrierDecl
 
std::string DaysToDate_LocalBarrier
 
std::string GetYearDiff_newDecl
 
std::string GetYearDiff_new
 
std::string GetDiffDate_newDecl
 
std::string GetDiffDate_new
 

Macro Definition Documentation

#define SC_OPENCL_OPINLINFUN_finacial
#define SC_OPENCL_OPINLINFUN_finacial

Definition at line 11 of file opinlinefun_finacial.cxx.

Variable Documentation

std::string addMonths
Initial value:
=
"void addMonths(int b30Days,int bLastDay,int *nDay,int nOrigDay,"
"int *nMonth,int nMonthCount,int *year)\n"
"{\n"
" int nNewMonth = nMonthCount + *nMonth;\n"
" if( nNewMonth > 12 )\n"
" {\n"
" --nNewMonth;\n"
" *year+=nNewMonth / 12 ;\n"
" *nMonth = ( nNewMonth % 12 ) + 1;\n"
" }\n"
" else if( nNewMonth < 1 )\n"
" {\n"
" *year+= nNewMonth / 12 - 1 ;\n"
" *nMonth = nNewMonth % 12 + 12 ;\n"
" }\n"
" else\n"
" *nMonth = nNewMonth ;\n"
" if( b30Days )\n"
" {\n"
" *nDay = min( nOrigDay, 30);\n"
" if( bLastDay || (*nDay >= DaysInMonth( *nMonth, *year )) )\n"
" *nDay = 30;\n"
" }\n"
" else\n"
" {\n"
" int nLastDay = DaysInMonth( *nMonth, *year );\n"
" *nDay = bLastDay ? nLastDay : min( nOrigDay, nLastDay );\n"
" }\n"
"}\n"

Definition at line 398 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun(), sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpPriceDisc::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), sc::opencl::OpCoupdaysnc::BinInlineFun(), sc::opencl::OpCouppcd::BinInlineFun(), sc::opencl::OpCoupncd::BinInlineFun(), and sc::opencl::OpCoupnum::BinInlineFun().

std::string addMonthsDecl
std::string checklessthan
Initial value:
=
"int checklessthan(int aYear,int bYear,int aMonth,int bMonth,int anDay,int "
"bnDay,int abLastDay,int bbLastDay,int anOrigDay,int bnOrigDay)\n"
"{\n"
" if( aYear != bYear )\n"
" return aYear < bYear;\n"
" if( aMonth != bMonth )\n"
" return aMonth < bMonth;\n"
" if( anDay != bnDay )\n"
" return anDay < bnDay;\n"
" if( abLastDay || bbLastDay )\n"
" return !abLastDay && bbLastDay;\n"
" return anOrigDay < bnOrigDay;\n"
"}\n"

Definition at line 957 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), sc::opencl::OpCoupdaysnc::BinInlineFun(), sc::opencl::OpCouppcd::BinInlineFun(), sc::opencl::OpCoupncd::BinInlineFun(), and sc::opencl::OpCoupnum::BinInlineFun().

std::string checklessthanDecl
Initial value:
=
"int checklessthan(int aYear,int bYear,int aMonth,int bMonth,int anDay,int "
"bnDay,int abLastDay,int bbLastDay,int anOrigDay,int bnOrigDay);\n"

Definition at line 954 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpMDuration::BinInlineFun(), sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), sc::opencl::OpCoupdaysnc::BinInlineFun(), sc::opencl::OpCouppcd::BinInlineFun(), sc::opencl::OpCoupncd::BinInlineFun(), and sc::opencl::OpCoupnum::BinInlineFun().

std::string coupdaybs
Initial value:
=
"double coupdaybs( int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=GetNullDate();\n"
" return lcl_Getcoupdaybs(nNullDate, nSettle, nMat,nFreq, nBase);\n"
"}\n"

Definition at line 854 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string coupdaybs_new
Initial value:
=
"double coupdaybs_new( int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=693594;\n"
" return lcl_Getcoupdaybs_new(nNullDate, nSettle, nMat,nFreq, nBase);\n"
"}\n"

Definition at line 864 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string coupdaybs_newDecl
Initial value:
=
"double coupdaybs_new( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 861 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string coupdaybsDecl
Initial value:
=
"double coupdaybs( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 851 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string coupdays
Initial value:
=
"double coupdays(int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=GetNullDate();\n"
" if( nBase == 1 )\n"
" return lcl_Getcoupdays(nNullDate, nSettle, nMat,nFreq, nBase);\n"
" else\n"
" return (double)GetDaysInYear(0,0,nBase)/nFreq;\n"
"}\n"

Definition at line 829 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string coupdays_new
Initial value:
=
"double coupdays_new(int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=693594;\n"
" if( nBase == 1 )\n"
" return lcl_Getcoupdays_new(nNullDate, nSettle, nMat,nFreq, nBase);\n"
" else\n"
" return (double)GetDaysInYear(0,0,nBase)*pow((double)nFreq,-1.0);\n"
"}\n"

Definition at line 841 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string coupdays_newDecl
Initial value:
=
"double coupdays_new(int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 838 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string coupdaysDecl
Initial value:
=
"double coupdays(int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 826 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string coupdaysnc

Definition at line 874 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string coupdaysnc_new
std::string coupdaysnc_newDecl
Initial value:
=
"double coupdaysnc_new( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 911 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string coupdaysncDecl
Initial value:
=
"double coupdaysnc( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 871 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string coupnum
Initial value:
=
"double coupnum( int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=GetNullDate();\n"
" return lcl_Getcoupnum(nNullDate,nSettle,nMat,nFreq);\n"
"}\n"

Definition at line 975 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string coupnum_new
Initial value:
=
"double coupnum_new( int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=693594;\n"
" return lcl_Getcoupnum_new(nNullDate,nSettle,nMat,nFreq,nBase);\n"
"}\n"

Definition at line 984 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), and sc::opencl::OpCoupnum::BinInlineFun().

std::string coupnum_newDecl
Initial value:
=
"double coupnum_new( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 981 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), and sc::opencl::OpCoupnum::BinInlineFun().

std::string coupnumDecl
Initial value:
=
"double coupnum( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 972 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string DateToDays
Initial value:
=
"int DateToDays( int nDay, int nMonth, int nYear )\n"
"{\n"
" int nDays = ((int)nYear-1) * 365;\n"
" nDays += ((nYear-1) / 4) - ((nYear-1) / 100) + ((nYear-1) / 400);\n"
" for( int i = 1; i < nMonth; i++ )\n"
" nDays += DaysInMonth(i,nYear);\n"
" nDays += nDay;\n"
"\n"
" return nDays;\n"
"}\n"

Definition at line 236 of file opinlinefun_finacial.cxx.

std::string DateToDays_new
Initial value:
=
"int DateToDays_new( int nDay, int nMonth, int nYear )\n"
"{\n"
" int nDays = (nYear-1) * 365;\n"
" nDays += (int)((nYear-1) *pow(4.0,-1.0)- (nYear-1) *pow( 100.0,-1.0)"
"+ (nYear-1) *pow(400.0,-1.0));\n"
" for( int i = 1; i < nMonth; i++ )\n"
" nDays += DaysInMonth(i,nYear);\n"
" nDays += nDay;\n"
"\n"
" return nDays;\n"
"}\n"

Definition at line 251 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string DateToDays_newDecl
Initial value:
=
"int DateToDays_new( int nDay, int nMonth, int nYear );\n"

Definition at line 248 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string DateToDaysDecl
std::string DaysInMonth
Initial value:
=
"int DaysInMonth( int nMonth, int nYear )\n"
"{\n"
" int aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,\n"
" 31, 31, 30, 31, 30, 31 };\n"
"\n"
" if ( nMonth != 2 )\n"
" return aDaysInMonth[nMonth-1];\n"
" else\n"
" {\n"
" if ( IsLeapYear(nYear) )\n"
" return aDaysInMonth[nMonth-1] + 1;\n"
" else\n"
" return aDaysInMonth[nMonth-1];\n"
" }\n"
"}\n"

Definition at line 136 of file opinlinefun_finacial.cxx.

std::string DaysInMonth_new
Initial value:
=
"int DaysInMonth( int nMonth, int nYear )\n"
"{\n"
" int tmp = 0;\n"
" switch(nMonth)\n"
" {\n"
" case 1:\n"
" case 3:\n"
" case 5:\n"
" case 7:\n"
" case 8:\n"
" case 10:\n"
" case 12:\n"
" tmp = 31;\n"
" break;\n"
" case 4:\n"
" case 6:\n"
" case 9:\n"
" case 11:\n"
" tmp =30;\n"
" break;\n"
" case 2:\n"
" if ( IsLeapYear(nYear)==1)\n"
" tmp = 29;\n"
" else\n"
" tmp = 28;\n"
" break;\n"
" }\n"
" return tmp;\n"
"}\n"

Definition at line 155 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdaysnc::BinInlineFun(), and sc::opencl::OpCoupnum::BinInlineFun().

std::string DaysInMonth_newDecl
Initial value:
=
"int DaysInMonth( int nMonth, int nYear );\n"

Definition at line 152 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string DaysInMonthDecl
std::string DaysToDate

Definition at line 189 of file opinlinefun_finacial.cxx.

std::string DaysToDate_LocalBarrier
std::string DaysToDate_LocalBarrierDecl
Initial value:
=
"void DaysToDate( int nDays, int *rDay, int* rMonth, int* rYear );\n"

Definition at line 1796 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpTbilleq::BinInlineFun(), and sc::opencl::OpTbillyield::BinInlineFun().

std::string DaysToDate_new
std::string DaysToDate_newDecl
Initial value:
=
"void DaysToDate_new( int nDays, int *rDay, int* rMonth, int* rYear );\n"

Definition at line 1751 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpINTRATE::BinInlineFun(), and sc::opencl::OpYieldmat::BinInlineFun().

std::string DaysToDateDecl
std::string DblMin
Initial value:
=
"inline double DblMin( double a, double b )\n"
"{\n"
" return (a < b) ? a : b;\n"
"}\n"

Definition at line 1479 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpVDB::BinInlineFun().

std::string DblMinDecl
Initial value:
=
"inline double DblMin( double a, double b );\n"

Definition at line 1476 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpVDB::BinInlineFun().

std::string getDaysInMonthRange
Initial value:
=
"int getDaysInMonthRange( int nFrom, int nTo,int b30Days,int year)\n"
"{\n"
" if( nFrom > nTo )\n"
" return 0;\n"
" int nRet = 0;\n"
" if( b30Days )\n"
" nRet = (nTo - nFrom + 1) * 30;\n"
" else\n"
" {\n"
" for( int nMonthIx = nFrom; nMonthIx <= nTo; ++nMonthIx )\n"
" nRet += b30Days ? 30 : DaysInMonth( nMonthIx, year );\n"
" }\n"
" return nRet;\n"
"}\n"

Definition at line 432 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun(), sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpPriceDisc::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string getDaysInMonthRangeDecl
std::string GetDaysInYear
Initial value:
=
"int GetDaysInYear( int nNullDate, int nDate, int nMode )\n"
"{\n"
" switch( nMode )\n"
" {\n"
" case 0:\n"
" case 2:\n"
" case 4:\n"
" return 360;\n"
" case 1:\n"
" {\n"
" int nD=0, nM=0, nY=0;\n"
" nDate += nNullDate;\n"
" DaysToDate( nDate, &nD, &nM, &nY );\n"
" return IsLeapYear( nY )? 366 : 365;\n"
" }\n"
" case 3:\n"
" return 365;\n"
" }\n"
"}\n"

Definition at line 471 of file opinlinefun_finacial.cxx.

std::string GetDaysInYearDecl
std::string getDaysInYearRange
Initial value:
=
"int getDaysInYearRange( int nFrom, int nTo,int b30Days )\n"
"{\n"
" if( nFrom > nTo )\n"
" return 0;\n"
" return b30Days ? ((nTo - nFrom + 1) * 360) : GetDaysInYears( nFrom, nTo)"
";\n"
"}\n"

Definition at line 495 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun(), sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpPriceDisc::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string getDaysInYearRangeDecl
std::string GetDaysInYears
Initial value:
=
"int GetDaysInYears( int nYear1, int nYear2 )\n"
"{\n"
" int nLeaps = 0;\n"
" for( int n = nYear1 ; n <= nYear2 ; n++ )\n"
" {\n"
" if( IsLeapYear( n ) )\n"
" nLeaps++;\n"
" }\n"
" int nSum = 1;\n"
" nSum += nYear2;\n"
" nSum -= nYear1;\n"
" nSum *= 365;\n"
" nSum += nLeaps;\n"
" return nSum;\n"
"}\n"

Definition at line 451 of file opinlinefun_finacial.cxx.

std::string GetDaysInYearsDecl
std::string getDiff
std::string GetDiffDate

Definition at line 1250 of file opinlinefun_finacial.cxx.

std::string GetDiffDate360
Initial value:
=
"int GetDiffDate360( int nNullDate, int nDate1, int nDate2,"
"bool bUSAMethod )\n"
"{\n"
" nDate1 += nNullDate;\n"
" nDate2 += nNullDate;\n"
" int nDay1, nMonth1, nYear1, nDay2, nMonth2, nYear2;\n"
" DaysToDate( nDate1, &nDay1, &nMonth1, &nYear1 );\n"
" DaysToDate( nDate2, &nDay2, &nMonth2, &nYear2 );\n"
" return GetDiffDate360_( nDay1, nMonth1, nYear1, IsLeapYear( nYear1 ), "
"nDay2, nMonth2, nYear2, bUSAMethod );\n"
"}\n"

Definition at line 1363 of file opinlinefun_finacial.cxx.

std::string GetDiffDate360_
Initial value:
=
"int GetDiffDate360_(\n"
" int nDay1, int nMonth1, int nYear1, bool bLeapYear1,\n"
" int nDay2, int nMonth2, int nYear2,\n"
" bool bUSAMethod )\n"
"{\n"
" if( nDay1 == 31 )\n"
" nDay1--;\n"
" else if( bUSAMethod && ( nMonth1 == 2 && ( nDay1 == 29 || ( nDay1 == 28 "
"&& !bLeapYear1 ) ) ) )\n"
" nDay1 = 30;\n"
" if( nDay2 == 31 )\n"
" {\n"
" if( bUSAMethod && nDay1 != 30 )\n"
" {\n"
" nDay2 = 1;\n"
" if( nMonth2 == 12 )\n"
" {\n"
" nYear2++;\n"
" nMonth2 = 1;\n"
" }\n"
" else\n"
" nMonth2++;\n"
" }\n"
" else\n"
" nDay2 = 30;\n"
" }\n"
" return nDay2 + nMonth2 * 30 + nYear2 * 360 - nDay1 - nMonth1 * 30 - "
"nYear1 * 360;\n"
"}\n"

Definition at line 1328 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpTbilleq::BinInlineFun(), and sc::opencl::OpTbillyield::BinInlineFun().

std::string GetDiffDate360_Decl
Initial value:
=
"int GetDiffDate360_(\n"
" int nDay1, int nMonth1, int nYear1, bool bLeapYear1,\n"
" int nDay2, int nMonth2, int nYear2,\n"
" bool bUSAMethod );\n"

Definition at line 1322 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpTbilleq::BinInlineFun(), and sc::opencl::OpTbillyield::BinInlineFun().

std::string GetDiffDate360Decl
Initial value:
=
"int GetDiffDate360( int nNullDate, int nDate1, int nDate2,"
"bool bUSAMethod);\n"

Definition at line 1359 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpTbilleq::BinInlineFun(), and sc::opencl::OpTbillyield::BinInlineFun().

std::string GetDiffDate_new

Definition at line 1861 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpINTRATE::BinInlineFun().

std::string GetDiffDate_newDecl
Initial value:
=
"int GetDiffDate_new( int nNullDate, int nStartDate, int nEndDate, int nMode,"
" int* pOptDaysIn1stYear );\n"

Definition at line 1857 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpINTRATE::BinInlineFun().

std::string GetDiffDateDecl
Initial value:
=
"int GetDiffDate( int nNullDate, int nStartDate, int nEndDate, int nMode,"
" int* pOptDaysIn1stYear );\n"

Definition at line 1246 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpAccrintm::BinInlineFun(), sc::opencl::OpAccrint::BinInlineFun(), sc::opencl::OpOddlprice::BinInlineFun(), sc::opencl::OpOddlyield::BinInlineFun(), sc::opencl::OpPriceDisc::BinInlineFun(), and sc::opencl::OpReceived::BinInlineFun().

std::string getDiffDecl
Initial value:
=
"int getDiff(int rFrom,int rTo,int fDay,int fMonth,int fYear,int fbLastDayMode,"
"int fbLastDay,int fb30Days,int fbUSMode,int fnDay,int tDay,int tMonth,"
"int tYear,int tbLastDayMode,int tbLastDay,int tb30Days,"
"int tbUSMode,int tnDay);\n"

Definition at line 504 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun(), sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpPriceDisc::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string GetDuration
Initial value:
=
"double GetDuration( \n"
" int nNullDate, int nSettle, int nMat, double fCoup,\n"
" double fYield, int nFreq, int nBase )\n"
"{\n"
" double fYearfrac = GetYearFrac( nNullDate, nSettle, nMat, nBase );\n"
" double fNumOfCoups = lcl_Getcoupnum(nNullDate,nSettle,nMat,nFreq);\n"
" double fDur = 0.0;\n"
" double f100 = 100.0;\n"
" fCoup *= f100 / nFreq;\n"
" fYield /= nFreq;\n"
" fYield += 1.0;\n"
" double nDiff = fYearfrac * nFreq - fNumOfCoups;\n"
" int t;\n"
" for( t = 1 ; t < fNumOfCoups ; t++ )\n"
" fDur += ( t + nDiff ) * ( fCoup ) / pow( fYield, t + nDiff );\n"
" fDur += ( fNumOfCoups + nDiff ) * ( fCoup + f100 ) /"
" pow( fYield, fNumOfCoups + nDiff );\n"
" double p = 0.0;\n"
" for( t = 1 ; t < fNumOfCoups ; t++ )\n"
" p += fCoup / pow( fYield, t + nDiff );\n"
" p += ( fCoup + f100 ) / pow( fYield, fNumOfCoups + nDiff );\n"
" fDur /= p;\n"
" fDur /= nFreq;\n"
" return fDur;\n""}\n"

Definition at line 1381 of file opinlinefun_finacial.cxx.

std::string GetDuration_new

Definition at line 1412 of file opinlinefun_finacial.cxx.

std::string GetDuration_newDecl
Initial value:
=
"double GetDuration_new( \n"
" int nNullDate, int nSettle, int nMat, double fCoup,\n"
" double fYield, int nFreq, int nBase );\n"

Definition at line 1407 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpMDuration::BinInlineFun().

std::string GetDurationDecl
Initial value:
=
"double GetDuration( \n"
" int nNullDate, int nSettle, int nMat, double fCoup,\n"
" double fYield, int nFreq, int nBase );\n"

Definition at line 1376 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpDuration_ADD::BinInlineFun().

std::string GetFV
Initial value:
=
"double GetFV( double fRate, double fNper, double fPmt,"
"double fPv, int nPayType )\n"
"{\n"
" double fFv;\n"
" if( fRate == 0.0 )\n"
" fFv = fPv + fPmt * fNper;\n"
" else\n"
" {\n"
" double fTerm = pow( 1.0 + fRate, fNper );\n"
" if( nPayType > 0 )\n"
" fFv = fPv * fTerm + fPmt * ( 1.0 + fRate ) *( fTerm - 1.0 ) "
"/ fRate;\n"
" else\n"
" fFv = fPv * fTerm + fPmt * ( fTerm - 1.0 ) / fRate;\n"
" }\n"
" return -fFv;\n"
"}\n"

Definition at line 86 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpFV::BinInlineFun(), sc::opencl::OpIPMT::BinInlineFun(), and sc::opencl::OpPPMT::BinInlineFun().

std::string GetFV_new
Initial value:
=
"double GetFV_new( double fRate, double fNper, double fPmt,"
"double fPv, int nPayType )\n"
"{\n"
" double fFv;\n"
" double fTerm = pow( 1.0 + fRate, fNper );\n"
" if( nPayType > 0 )\n"
" fFv = fPv * fTerm + fPmt * ( 1.0 + fRate ) *( fTerm - 1.0 ) "
"*pow( fRate,-1);\n"
" else\n"
" fFv = fPv * fTerm + fPmt * ( fTerm - 1.0 ) *pow( fRate,-1);\n"
" return -fFv;\n"
"}\n"

Definition at line 109 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::Cumipmt::BinInlineFun().

std::string GetFV_newDecl
Initial value:
=
"double GetFV_new( double fRate, double fNper, double fPmt,"
"double fPv, int nPayType );\n"

Definition at line 105 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::Cumipmt::BinInlineFun().

std::string GetFVDecl
Initial value:
=
"double GetFV( double fRate, double fNper, double fPmt,"
"double fPv, int nPayType );\n"

Definition at line 82 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpFV::BinInlineFun(), sc::opencl::OpIPMT::BinInlineFun(), and sc::opencl::OpPPMT::BinInlineFun().

std::string GetNullDate
Initial value:
=
"int GetNullDate()\n"
"{\n"
" return DateToDays(30,12,1899 );\n"
"}\n"

Definition at line 267 of file opinlinefun_finacial.cxx.

std::string GetNullDate_new
Initial value:
=
"int GetNullDate_new()\n"
"{\n"
" return DateToDays_new(30,12,1899 );\n"
"}\n"

Definition at line 275 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpCoupdaybs::BinInlineFun(), and sc::opencl::OpCoupdays::BinInlineFun().

std::string GetNullDate_newDecl
Initial value:
=
"int GetNullDate_new();\n"

Definition at line 272 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpCoupdaybs::BinInlineFun(), and sc::opencl::OpCoupdays::BinInlineFun().

std::string GetNullDateDecl
std::string GetOddlprice
Initial value:
=
"double GetOddlprice( int nNullDate, int nSettle, int nMat, int nLastCoup,\n"
" double fRate, double fYield, double fRedemp, int nFreq, int nBase )\n"
"{\n"
" double fFreq = nFreq ;\n"
" double fDCi = GetYearFrac( nNullDate, nLastCoup,"
"nMat, nBase ) * fFreq;\n"
" double fDSCi = GetYearFrac( nNullDate, nSettle,"
"nMat, nBase ) * fFreq;\n"
" double fAi = GetYearFrac( nNullDate, nLastCoup,"
"nSettle, nBase ) * fFreq;\n"
" double p = fRedemp + fDCi * 100.0 * fRate / fFreq;\n"
" p /= fDSCi * fYield / fFreq + 1.0;\n"
" p -= fAi * 100.0 * fRate / fFreq;\n"
" return p;\n"
"}\n"

Definition at line 1586 of file opinlinefun_finacial.cxx.

std::string GetOddlpriceDecl
Initial value:
=
"double GetOddlprice( int nNullDate, int nSettle, int nMat, int nLastCoup,\n"
" double fRate, double fYield, double fRedemp, int nFreq, int nBase );\n"

Definition at line 1582 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpOddlprice::BinInlineFun().

std::string GetOddlyield
Initial value:
=
"double GetOddlyield( int nNullDate, int nSettle, int nMat, int nLastCoup,\n"
" double fRate, double fPrice, double fRedemp, int nFreq, int nBase ) \n"
"{\n"
" double fFreq = nFreq ;\n"
" double fDCi= GetYearFrac( nNullDate, nLastCoup, nMat, nBase ) * fFreq;\n"
" double fDSCi= GetYearFrac( nNullDate, nSettle, nMat, nBase ) * fFreq;\n"
" double fAi= GetYearFrac( nNullDate, nLastCoup, nSettle, nBase )*fFreq;\n"
" double y = fRedemp + fDCi * 100.0 * fRate / fFreq;\n"
" y /= fPrice + fAi * 100.0 * fRate / fFreq;\n"
" y -= 1.0;\n"
" y *= fFreq / fDSCi;\n"
" return y;\n"
"}\n"

Definition at line 1607 of file opinlinefun_finacial.cxx.

std::string GetOddlyieldDecl
Initial value:
=
"double GetOddlyield( int nNullDate, int nSettle, int nMat, int nLastCoup,\n"
" double fRate, double fPrice, double fRedemp, int nFreq, int nBase );\n"

Definition at line 1603 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpOddlyield::BinInlineFun().

std::string GetPMT
Initial value:
=
"double GetPMT( double fRate, double fNper, double fPv, double fFv, int nPayType )\n"
"{\n"
" double fPmt;\n"
" if( fRate == 0.0 )\n"
" fPmt = ( fPv + fFv ) / fNper;\n"
" else\n"
" {\n"
" double fTerm = pow( 1.0 + fRate, fNper );\n"
" if( nPayType > 0 )\n"
" fPmt = ( fFv * fRate / ( fTerm - 1.0 ) + fPv * fRate / ( 1.0 - 1."
"0 / fTerm ) ) / ( 1.0 + fRate );\n"
" else\n"
" fPmt = fFv * fRate / ( fTerm - 1.0 ) + fPv * fRate /( 1.0 - 1.0 "
"/ fTerm );\n"
" }\n"
" return -fPmt;\n"
"}\n"

Definition at line 46 of file opinlinefun_finacial.cxx.

std::string GetPMT_new
Initial value:
=
"double GetPMT_new( double fRate, double fNper, double fPv, double fFv,"
"int nPayType)\n"
"{\n"
" double fPmt;\n"
" double fTerm = pow( 1.0 + fRate, fNper );\n"
" if( nPayType > 0 )\n"
" fPmt = ( fFv * fRate *pow ( fTerm - 1.0,-1 ) + fPv * fRate *pow( "
"( 1.0 - pow( fTerm,-1) ),-1) )* pow ( 1.0 + fRate,-1 );\n"
" else\n"
" fPmt = fFv * fRate *pow ( fTerm - 1.0 ,-1) + fPv * fRate *pow( "
"1.0 - pow( fTerm,-1),-1 );\n"
" return -fPmt;\n"
"}\n"

Definition at line 68 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::Cumipmt::BinInlineFun().

std::string GetPMT_newDecl
Initial value:
=
"double GetPMT_new( double fRate, double fNper, double fPv, double fFv,"
"int nPayType );\n"

Definition at line 65 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::Cumipmt::BinInlineFun().

std::string GetPMTDecl
Initial value:
=
"double GetPMT( double fRate, double fNper, double fPv, double fFv, int nPayType );\n"

Definition at line 43 of file opinlinefun_finacial.cxx.

std::string getPrice_
Initial value:
=
"double getPrice_(int nSettle, int nMat, double fRate, double fYield,\n"
"double fRedemp, int nFreq, int nBase )\n"
"{\n"
" double fFreq = nFreq;\n"
" double fE = coupdays( nSettle, nMat, nFreq, nBase );\n"
" double fDSC_E = coupdaysnc( nSettle, nMat, nFreq, nBase ) / fE;\n"
" double fN = coupnum( nSettle, nMat, nFreq, nBase );\n"
" double fA = coupdaybs( nSettle, nMat, nFreq, nBase );\n"
" double fRet = fRedemp / ( pow( 1.0 + fYield / fFreq, fN - 1.0 + "
"fDSC_E ) );\n"
" fRet -= 100.0 * fRate / fFreq * fA / fE;\n"
" double fT1 = 100.0 * fRate / fFreq;\n"
" double fT2 = 1.0 + fYield / fFreq;\n"
" for( double fK = 0.0 ; fK < fN ; fK+=1.0 )\n"
" fRet += fT1 / pow( fT2, fK + fDSC_E );\n"
" return fRet;\n"
"}\n"

Definition at line 995 of file opinlinefun_finacial.cxx.

std::string getPrice_Decl
Initial value:
=
"double getPrice_(int nSettle, int nMat, double fRate, double fYield,\n"
"double fRedemp, int nFreq, int nBase );\n"

Definition at line 991 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string getPrice_new
Initial value:
=
"double getPrice_(int nSettle, int nMat, double fRate, double fYield,\n"
"double fRedemp, int nFreq, int nBase )\n"
"{\n"
" double fFreq = nFreq;\n"
" double fE = coupdays_new( nSettle, nMat, nFreq, nBase );\n"
" double fDSC_E = coupdaysnc_new( nSettle, nMat, nFreq, nBase ) / fE;\n"
" double fN = coupnum_new( nSettle, nMat, nFreq, nBase );\n"
" double fA = coupdaybs_new( nSettle, nMat, nFreq, nBase );\n"
" double fRet = fRedemp / ( pow( 1.0 + fYield / fFreq, fN - 1.0 + "
"fDSC_E ) );\n"
" fRet -= 100.0 * fRate / fFreq * fA / fE;\n"
" double fT1 = 100.0 * fRate / fFreq;\n"
" double fT2 = 1.0 + fYield / fFreq;\n"
" for( double fK = 0.0 ; fK < fN ; fK+=1.0 )\n"
" fRet += fT1 / pow( fT2, fK + fDSC_E );\n"
" return fRet;\n"
"}\n"

Definition at line 1017 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun().

std::string getPrice_new_Decl
Initial value:
=
"double getPrice_(int nSettle, int nMat, double fRate, double fYield,\n"
"double fRedemp, int nFreq, int nBase );\n"

Definition at line 1013 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun().

std::string GetYearDiff
Initial value:
=
"double GetYearDiff( int nNullDate, int nStartDate, int nEndDate,"
"int nMode )\n"
"{\n"
" int nDays1stYear;\n"
" int nTotalDays = GetDiffDate( nNullDate, nStartDate, nEndDate,"
"nMode, &"
"nDays1stYear );\n"
" return (double)(nTotalDays)*pow((double)nDays1stYear,-1);\n"
"}\n"

Definition at line 1311 of file opinlinefun_finacial.cxx.

std::string GetYearDiff_new
Initial value:
=
"double GetYearDiff_new( int nNullDate, int nStartDate, int nEndDate,"
"int nMode )\n"
"{\n"
" int nDays1stYear;\n"
" int nTotalDays = GetDiffDate_new( nNullDate, nStartDate, nEndDate,"
"nMode, &"
"nDays1stYear );\n"
" return (double)(nTotalDays)* pow((double)nDays1stYear,-1);\n"
"}\n"

Definition at line 1846 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpINTRATE::BinInlineFun().

std::string GetYearDiff_newDecl
Initial value:
=
"double GetYearDiff_new( int nNullDate, int nStartDate, int nEndDate,"
"int nMode);\n"

Definition at line 1842 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpINTRATE::BinInlineFun().

std::string GetYearDiffDecl
Initial value:
=
"double GetYearDiff( int nNullDate, int nStartDate, int nEndDate,"
"int nMode);\n"

Definition at line 1307 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpOddlprice::BinInlineFun(), sc::opencl::OpOddlyield::BinInlineFun(), sc::opencl::OpPriceDisc::BinInlineFun(), and sc::opencl::OpReceived::BinInlineFun().

std::string GetYearFrac

Definition at line 1094 of file opinlinefun_finacial.cxx.

std::string GetYearFrac_new

Definition at line 1626 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYieldmat::BinInlineFun().

std::string GetYearFrac_newDecl
Initial value:
=
"double GetYearFrac_new( int nNullDate, int nStartDate, int nEndDate,"
"int nMode );\n"

Definition at line 1622 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYieldmat::BinInlineFun().

std::string GetYearFracDecl
std::string getYield_

Definition at line 1040 of file opinlinefun_finacial.cxx.

std::string getYield_Decl
Initial value:
=
"double getYield_( int nNullDate, int nSettle, int nMat, double fCoup,"
"double fPrice,double fRedemp, int nFreq, int nBase);\n"

Definition at line 1036 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string GetYieldmat
Initial value:
=
"double GetYieldmat( int nNullDate, int nSettle, int nMat, int nIssue,\n"
"double fRate, double fPrice, int nBase )\n"
"{\n"
" double fIssMat = GetYearFrac_new( nNullDate, nIssue, nMat, nBase );\n"
" double fIssSet = GetYearFrac_new( nNullDate, nIssue, nSettle, nBase );\n"
" double fSetMat = GetYearFrac_new( nNullDate, nSettle, nMat, nBase );\n"
" double y = 1.0 + fIssMat * fRate;\n"
" y =y * pow( (fPrice / 100.0 + fIssSet * fRate),-1);\n"
" y-=1.0;\n"
" y = y * pow(fSetMat,-1);\n"
" return y;\n"
"}\n"

Definition at line 1232 of file opinlinefun_finacial.cxx.

std::string GetYieldmatDecl
Initial value:
=
"double GetYieldmat( int nNullDate, int nSettle, int nMat, int nIssue,\n"
"double fRate, double fPrice, int nBase );\n"

Definition at line 1228 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYieldmat::BinInlineFun().

std::string IsLeapYear
Initial value:
=
"bool IsLeapYear( int n )\n"
"{\n"
" return ( (( ( n % 4 ) == 0 ) && ( ( n % 100 ) != 0)) || ( ( n % 400 ) == "
"0 ) );\n"
"}\n"

Definition at line 126 of file opinlinefun_finacial.cxx.

std::string IsLeapYearDecl
std::string lcl_Getcoupdaybs
Initial value:
=
"int lcl_Getcoupdaybs(int nNullDate,int nSettle, int nMat,int nFreq,int nBase)\n"
"{\n"
" int aDate = nMat;\n"
" int rDay=0,rMonth=0, rYear=0;int mDay=0,mMonth=0, mYear=0;int sDay=0,"
"sMonth=0, sYear=0;\n"
" int rbLastDayMode=0, rbLastDay=0,rb30Days=0,rbUSMode=0,rnDay=0;\n"
" int sbLastDayMode=0, sbLastDay=0,sb30Days=0,sbUSMode=0,snDay=0;\n"
" ScaDate( nNullDate,aDate,nBase,&rDay,&rMonth,&rYear,&rbLastDayMode,&"
"rbLastDay,&rb30Days,&rbUSMode,&rnDay);\n"
" ScaDate( nNullDate,nSettle,nBase,&sDay,&sMonth,&sYear,&sbLastDayMode,&"
"sbLastDay,&sb30Days,&sbUSMode,&snDay);\n"
" rYear= sYear;\n"
" nSettle=nSettle+nNullDate;\n"
" aDate=DateToDays( rDay,rMonth,rYear );\n"
" if( aDate < nSettle )\n"
" {\n"
" rYear+= 1;\n"
" aDate=DateToDays( rDay,rMonth,rYear );\n"
" }\n"
" while(aDate > nSettle )\n"
" {\n"
" addMonths(rb30Days,rbLastDay,&rnDay,rDay,&rMonth,-1*(12/nFreq),&rYear"
");\n"
" aDate=DateToDays( rDay,rMonth,rYear );\n"
" }\n"
" return getDiff( aDate, nSettle, rDay, rMonth, rYear, rbLastDayMode, "
"rbLastDay, rb30Days, rbUSMode, rnDay, sDay, sMonth, sYear, sbLastDayMode,"
"sbLastDay, sb30Days, sbUSMode, snDay);\n"
"}\n"

Definition at line 571 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string lcl_Getcoupdaybs_new
std::string lcl_Getcoupdaybs_newDecl
Initial value:
=
"int lcl_Getcoupdaybs_new(int nNullDate,int nSettle,int nMat,int nFreq,"
"int nBase);\n"

Definition at line 602 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string lcl_GetcoupdaybsDecl
Initial value:
=
"int lcl_Getcoupdaybs(int nNullDate,int nSettle, int nMat,int nFreq,int nBase);\n"

Definition at line 568 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string lcl_Getcoupdays

Definition at line 645 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string lcl_Getcoupdays_new
std::string lcl_Getcoupdays_newDecl
Initial value:
=
"int lcl_Getcoupdays_new(int nNullDate,int nSettle, "
"int nMat,int nFreq,int nBase);\n"

Definition at line 681 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string lcl_GetcoupdaysDecl
Initial value:
=
"int lcl_Getcoupdays(int nNullDate,int nSettle, "
"int nMat,int nFreq,int nBase);\n"

Definition at line 641 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string lcl_GetCoupncd
Initial value:
=
"int lcl_GetCoupncd(int nNullDate,int nSettle, int nMat,int nFreq,int nBase)\n"
"{\n"
" int aDate = nMat;\n"
" int rDay=0,rMonth=0, rYear=0,rbLastDayMode=0, rbLastDay=0,rb30Days=0,"
"rbUSMode=0,rnDay=0;\n"
" int sDay=0,sMonth=0, sYear=0,sbLastDayMode=0, sbLastDay=0,sb30Days=0,"
"sbUSMode=0,snDay=0;\n"
" ScaDate( nNullDate,nSettle,nBase,&sDay,&sMonth,&sYear,&sbLastDayMode,"
"&sbLastDay,&sb30Days,&sbUSMode,&snDay);\n"
" ScaDate( nNullDate,aDate,nBase,&rDay,&rMonth,&rYear,&rbLastDayMode,"
"&rbLastDay,&rb30Days,&rbUSMode,&rnDay);\n"
" rYear=sYear;\n"
" setDay(rDay,rMonth,rYear,rbLastDay,rb30Days,&rnDay);\n"
" if(checklessthan(sYear,rYear,sMonth,rMonth,snDay,rnDay,sbLastDay,rbLastDay"
",sDay,rDay))\n"
" {\n"
" rYear-=1;\n"
" setDay(rDay,rMonth,rYear,rbLastDay,rb30Days,&rnDay);\n"
" }\n"
" while(!checklessthan(sYear,rYear,sMonth,rMonth,snDay,rnDay,sbLastDay,"
"rbLastDay,sDay,rDay))\n"
" {\n"
" addMonths(rb30Days,rbLastDay,&rnDay,rDay,&rMonth,12/nFreq,&rYear);\n"
" }\n"
" int nLastDay = DaysInMonth( rMonth, rYear );\n"
" int nRealDay = (rbLastDayMode && rbLastDay) ? nLastDay :"
"min( nLastDay, rDay );\n"
" return DateToDays( nRealDay, rMonth, rYear ) - nNullDate;\n"
"}\n"

Definition at line 363 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpCoupncd::BinInlineFun().

std::string lcl_GetCoupncdDecl
Initial value:
=
"int lcl_GetCoupncd(int nNullDate,int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 360 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpCoupncd::BinInlineFun().

std::string lcl_Getcoupnum
std::string lcl_Getcoupnum_new
std::string lcl_Getcoupnum_newDecl
Initial value:
=
"double lcl_Getcoupnum_new(int nNullDate,int nSettle,int nMat,int nFreq,int"
" nBase);\n"

Definition at line 766 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpMDuration::BinInlineFun(), sc::opencl::OpPrice::BinInlineFun(), and sc::opencl::OpCoupnum::BinInlineFun().

std::string lcl_GetcoupnumDecl
Initial value:
=
"int lcl_Getcoupnum(int nNullDate,int nSettle, int nMat,int nFreq);\n"

Definition at line 725 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpDuration_ADD::BinInlineFun(), and sc::opencl::OpYield::BinInlineFun().

std::string lcl_GetCouppcd

Definition at line 328 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpCouppcd::BinInlineFun().

std::string lcl_GetCouppcdDecl
Initial value:
=
"int lcl_GetCouppcd(int nNullDate,int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 325 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpCouppcd::BinInlineFun().

std::string nCorrValDecl
Initial value:
="double constant nCorrVal[]"
"= {0, 9e-1, 9e-2, 9e-3, 9e-4, 9e-5, 9e-6, 9e-7, "
"9e-8,9e-9, 9e-10, 9e-11, 9e-12, 9e-13, 9e-14, 9e-15};\n"

Definition at line 13 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpAmordegrc::BinInlineFun(), sc::opencl::OpAmorlinc::BinInlineFun(), and sc::opencl::RATE::BinInlineFun().

std::string Round
Initial value:
=
"double Round(double fValue)\n"
"{\n"
" if ( fValue == 0.0 )\n"
" return fValue;\n"
"\n"
" double fFac = 0;\n"
" int nExp;\n"
" if ( fValue > 0.0 )\n"
" nExp = ( floor( log10( fValue ) ) );\n"
" else\n"
" nExp = 0;\n"
" int nIndex = 15 - nExp;\n"
" if ( nIndex > 15 )\n"
" nIndex = 15;\n"
" else if ( nIndex <= 1 )\n"
" nIndex = 0;\n"
" fValue = floor( fValue + 0.5 + nCorrVal[nIndex] );\n"
" return fValue;\n"
"}\n"

Definition at line 22 of file opinlinefun_finacial.cxx.

std::string RoundDecl = "double Round(double fValue);\n"
std::string ScaDate
Initial value:
=
"void ScaDate( int nNullDate, int nDate, int nBase,int *nOrigDay, "
"int *nMonth,int *nYear,int *bLastDayMode,int *bLastDay,"
"int *b30Days,int *bUSMode,int *nDay)\n"
"{\n"
" DaysToDate( nNullDate + nDate, nOrigDay, nMonth, nYear );\n"
" *bLastDayMode = (nBase != 5);\n"
" *bLastDay = (*nOrigDay >= DaysInMonth( *nMonth, *nYear ));\n"
" *b30Days = (nBase == 0) || (nBase == 4);\n"
" *bUSMode = (nBase == 0);\n"
" if( *b30Days)\n"
" {\n"
" *nDay = min( *nOrigDay, 30);\n"
" if( *bLastDay || (*nDay >=DaysInMonth( *nMonth, *nYear )) )\n"
" *nDay = 30;\n"
" }\n"
" else\n"
" {\n"
" int nLastDay = DaysInMonth( *nMonth, *nYear );\n"
" *nDay = *bLastDay ? nLastDay : min( *nOrigDay, nLastDay );\n"
" }\n"
"}\n"

Definition at line 286 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun(), sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpPriceDisc::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), sc::opencl::OpCoupdaysnc::BinInlineFun(), sc::opencl::OpCouppcd::BinInlineFun(), sc::opencl::OpCoupncd::BinInlineFun(), and sc::opencl::OpCoupnum::BinInlineFun().

std::string ScaDate2
Initial value:
=
"void ScaDate2( int nNullDate, int nDate, int nBase,int *bLastDayMode,int *"
"bLastDay,int *b30Days,int *bUSMode)\n"
"{\n"
" int nOrigDay=0, nMonth=0, nYear=0;\n"
" DaysToDate( nNullDate + nDate, &nOrigDay, &nMonth, &nYear );\n"
" *bLastDayMode = (nBase != 5);\n"
" *bLastDay = (nOrigDay >= DaysInMonth( nMonth, nYear ));\n"
" *b30Days = (nBase == 0) || (nBase == 4);\n"
" *bUSMode = (nBase == 0);\n"
"}\n"

Definition at line 313 of file opinlinefun_finacial.cxx.

std::string ScaDate2Decl
Initial value:
=
"void ScaDate2( int nNullDate, int nDate, int nBase,int *bLastDayMode,int *"
"bLastDay,int *b30Days,int *bUSMode);\n"

Definition at line 309 of file opinlinefun_finacial.cxx.

std::string ScaDateDecl
Initial value:
=
"void ScaDate( int nNullDate, int nDate, int nBase,int *nOrigDay, "
"int *nMonth,int *nYear,int *bLastDayMode,int *bLastDay,"
"int *b30Days,int *bUSMode,int *nDay);\n"

Definition at line 281 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun(), sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpPriceDisc::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), sc::opencl::OpCoupdaysnc::BinInlineFun(), sc::opencl::OpCouppcd::BinInlineFun(), sc::opencl::OpCoupncd::BinInlineFun(), and sc::opencl::OpCoupnum::BinInlineFun().

std::string SCdEpsilonDecl
Initial value:
=
"constant double SCdEpsilon = 1.0E-7;\n"

Definition at line 17 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::RATE::BinInlineFun().

std::string ScGetDDB
Initial value:
=
"double ScGetDDB(double fCost, double fSalvage, double fLife, double fPeriod,"
"double fFactor)\n"
"{\n"
" double fDdb, fRate, fOldValue, fNewValue;\n"
" fRate = fFactor / fLife;\n"
" if (fRate >= 1.0)\n"
" {\n"
" fRate = 1.0;\n"
" if (fPeriod == 1.0)\n"
" fOldValue = fCost;\n"
" else\n"
" fOldValue = 0.0;\n"
" }\n"
" else\n"
" fOldValue = fCost * pow(1.0 - fRate, fPeriod - 1.0);\n"
" fNewValue = fCost * pow(1.0 - fRate, fPeriod);\n"
" if (fNewValue < fSalvage)\n"
" fDdb = fOldValue - fSalvage;\n"
" else\n"
" fDdb = fOldValue - fNewValue;\n"
" if (fDdb < 0.0)\n"
" fDdb = 0.0;\n"
" return fDdb;\n"
"}\n"

Definition at line 1449 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpVDB::BinInlineFun(), ScInterpreter::ScDDB(), ScInterpreter::ScInterVDB(), and ScInterpreter::ScVDB().

std::string ScGetDDBDecl
Initial value:
=
"double ScGetDDB(double fCost, double fSalvage, double fLife, double fPeriod,"
"double fFactor);\n"

Definition at line 1445 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpVDB::BinInlineFun().

std::string ScInterVDB
std::string ScInterVDBDecl
Initial value:
=
"double ScInterVDB(double fCost, double fSalvage, double fLife, double fLife1,"
"double fPeriod, double fFactor);\n"

Definition at line 1485 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpVDB::BinInlineFun().

std::string setDay
Initial value:
=
"void setDay(int nOrigDay, int nMonth,int nYear,int bLastDay,int b30Days,"
"int *nDay)\n"
"{\n"
" if( b30Days )\n"
" {\n"
" *nDay = min( nOrigDay, 30);\n"
" if( bLastDay || (*nDay >= DaysInMonth( nMonth, nYear )) )\n"
" *nDay = 30;\n"
" }\n"
" else\n"
" {\n"
" int nLastDay = DaysInMonth( nMonth, nYear );\n"
" *nDay = bLastDay ? nLastDay : min( nOrigDay, nLastDay );\n"
" }\n"
"}\n"

Definition at line 809 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), sc::opencl::OpCoupdaysnc::BinInlineFun(), sc::opencl::OpCouppcd::BinInlineFun(), sc::opencl::OpCoupncd::BinInlineFun(), and sc::opencl::OpCoupnum::BinInlineFun().

std::string setDayDecl
std::string VDBImplement

Definition at line 1537 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpVDB::BinInlineFun().

std::string VDBImplementDecl
Initial value:
=
"double VDBImplement(double fCost, double fSalvage, double fLife, double fStart"
", double fEnd, double fFactor, bool bNoSwitch);\n"

Definition at line 1533 of file opinlinefun_finacial.cxx.

Referenced by sc::opencl::OpVDB::BinInlineFun().