File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ module Apr =
185185 let lastWholeUnitPeriodBackIndex = ( scheduleCount - 1 ) % multiple
186186
187187 let offset =
188- ( scheduleCount - 1 ) - (( transferCount - 1 ) * multiple)
188+ scheduleCount - 1 - ( transferCount - 1 ) * multiple
189189 |> fun i -> Decimal.Floor( decimal i / decimal multiple) |> int
190190
191191 [| 0 .. ( transferCount - 1 ) |]
@@ -339,8 +339,7 @@ module Apr =
339339 |> Array.sumBy ( fun ( amount , remainder , quotient ) ->
340340 try // high quotients will yield oversize decimals but high divisors will yield a zero result anyway
341341 let divisor =
342- ( 1 m + ( remainder * unitPeriodRate))
343- * (( 1 m + unitPeriodRate) |> powi quotient)
342+ ( 1 m + remainder * unitPeriodRate) * ( 1 m + unitPeriodRate |> powi quotient)
344343
345344 if divisor = 0 m then 0 m else Cent.toDecimal amount / divisor
346345 with _ ->
You can’t perform that action at this time.
0 commit comments