I'm trying to make an app that calculates the payments of a credit, and I tried using ExcelFinancialFunctionsCore nuget for it. The payments can be calculated without problem but when trying to show the Irr to the client and the amount of payments surpass 512, the function stops working. The reason I has that amount of payments it's because of credits with a payment frecuency of weeks. Are there any alternatives to this package or a formula of some sorts that I could implement?
Here's my current solution but I would like to know if it could be done differently:
try
{
Cover.Irr = (decimal)Financial.Irr(payments);
}
catch
{
Cover.Irr = 0;
}
I would expect to stop using the catch because I would not like to handle exceptions if so, I would change it to an If that evaluates the length of the payments and don't execute said function