Skip to content

Commit d1921d3

Browse files
committed
remove unnecessary brackets
1 parent 3eedfd9 commit d1921d3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Apr.fs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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-
(1m + (remainder * unitPeriodRate))
343-
* ((1m + unitPeriodRate) |> powi quotient)
342+
(1m + remainder * unitPeriodRate) * (1m + unitPeriodRate |> powi quotient)
344343

345344
if divisor = 0m then 0m else Cent.toDecimal amount / divisor
346345
with _ ->

0 commit comments

Comments
 (0)