File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed
src/ExcelFinancialFunctions Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,10 @@ module internal TestPreconditions =
1818 ( pmt <> 0. || fv <> 0. )
1919 let tryFv r nper pmt pv pd =
2020 ( raisable r nper) &&
21- ( r <> - 1. || ( r = - 1. && nper > 0. ) ) &&
22- ( pmt <> 0. || pv <> 0. )
21+ ( r <> - 1. || ( r = - 1. && nper > 0. ) )
2322 let tryPmt r nper pv fv pd =
2423 ( raisable r nper) &&
2524 ( r > - 1. ) &&
26- ( fv <> 0. || pv <> 0. ) &&
2725 ( annuityCertainPvFactor r nper pd <> 0. )
2826 let tryNper r pmt pv fv pd =
2927 ( r > - 1. ) &&
Original file line number Diff line number Diff line change @@ -28,13 +28,11 @@ module internal Tvm =
2828 let calcFv r nper pmt pv pd =
2929 ( raisable r nper) |> elseThrow " r is not raisable to nper (r is negative and nper not an integer"
3030 ( r <> - 1. || ( r = - 1. && nper > 0. ) ) |> elseThrow " r cannot be -100% when nper is <= 0"
31- ( pmt <> 0. || pv <> 0. ) |> elseThrow " pmt or pv need to be different from 0"
3231 if r = - 1. && pd = PaymentDue.BeginningOfPeriod then - ( pv * fvFactor r nper)
3332 elif r = - 1. && pd = PaymentDue.EndOfPeriod then - ( pv * fvFactor r nper + pmt)
3433 else fv r nper pmt pv pd
3534 let calcPmt r nper pv fv pd =
3635 ( raisable r nper) |> elseThrow " r is not raisable to nper (r is negative and nper not an integer"
37- ( fv <> 0. || pv <> 0. ) |> elseThrow " fv or pv need to be different from 0"
3836 ( r <> - 1. || ( r = - 1. && nper > 0. && pd = PaymentDue.EndOfPeriod) ) |> elseThrow " r cannot be -100% when nper is <= 0"
3937 ( annuityCertainPvFactor r nper pd <> 0. ) |> elseThrow " 1 * pd + 1 - (1 / (1 + r)^nper) / nper has to be <> 0"
4038 if r = - 1. then - fv
You can’t perform that action at this time.
0 commit comments