noverde/exonio

Error with nper function

Closed this issue · 1 comments

I am using the nper function and works fine most of the times.

But for this specific values:
Exonio.nper(0.0575 / 12.0, -76.0, 943183.21)

I am having an error:
Math::DomainError Exception: Numerical argument is out of domain - "log"

Any idea about what can be the problem? Thanks.

@cleicar and I reviewed this issue and it seems that problem is with the data that we are providing.

The payment amount should not be lower than the interest amount.

Here is an idea: Maybe we should raise an error with more information about this? It could avoid future issues reports.