lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] [Was: _M_range_check fails when running "new" PDF]


From: Greg Chicares
Subject: [lmi] [Was: _M_range_check fails when running "new" PDF]
Date: Tue, 2 Oct 2018 12:17:38 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

[For the record: the defects noted in this old message have been fixed.]

On 2018-02-15 10:51, Greg Chicares wrote:
> On 2018-02-14 00:38, Greg Chicares wrote:
> 
> In 'ledger_evaluator.cpp', following the call to CalculateIrrs(),
> you'll find:
> 
>     std::vector<double> PolicyYear;
>     std::vector<double> AttainedAge;
> 
> which apparently aren't members of any ledger class (and
> which want to be initialized in some less tasteless way);

Instead of looping through the elements of those vectors,
commit f1af0f95 (not yet pushed) uses std::iota().

>     std::vector<double> InitAnnLoanDueRate(max_duration);
> 
> which bizarrely takes InterestRates::RegLnDueRate(), discards
> all elements except the first, and then replicates that to
> the original length, and then...

That was a conscious mistake in the XSL-FO original. This commit:
  2d6f27b1 2018-09-26 Add a yearly-varying fixed loan rate to a (renamed) 
exotic product
adds product 'sample2xyz', whose loan rate varies by year.
A default illustration using that product demonstrated the defect,
which has been fixed by this commit:
  f9ddc04e 2018-09-30 Do not depict a scalar as a vector

>   ledger_pdf_generator_wx.cpp:
>   ,{ "InitAnnLoanDueRate"  , "Assumed\nLoan Interest"      ,     "99.99%" }
> 
> ..presents it with a column title that seems appropriate only
> for the original InterestRates::RegLnDueRate()
A better title is now suggested in a comment on that line, and
is now the default in 'title_map':

ledger_evaluator.cpp:    title_map["AnnLoanDueRate"                  ] = 
"Loan\nInt Rate";
ledger_pdf_generator_wx.cpp:    // PDF !! AnnLoanDueRate: "Loan\nInt Rate" 
would be a better



reply via email to

[Prev in Thread] Current Thread [Next in Thread]