
 Alan Anderson - 2018-02-26 21:03:14 - 
In reply to message 3 from Harry SiereveldI don't have time to review this right now.  There should be better error handling.  From my initial review it looks like you will get this in the following scenarios:
  1. $rate == 0 && $nper == 0
  2. $rate * $type == -1
  3. (1+$rate) ^ $nper == 1, which can only happen if $rate == 0 which there is a check that prevents you from hitting this code if $rate == 0, so I think it is probably the 1st issue to look into.
Thanks,
Alan