fork download
  1. main = mapM_ putStrLn ["homoCredit: " ++ x 40000 0.03 1000 5000,
  2. "softBank: " ++ x 40000 0.04 500 5000,
  3. "strawberryBank: " ++ x 47777 0.02 0 5000]
  4.  
  5. x a b c d = show $ d*m + (a*(b+1)**m-(1-(b+1)**m)/(-b)*(d-c))*(b+1) + c where
  6. m = fromIntegral $ floor $ logBase (b+1) $ (d-c)/((-b)*a+d-c)
Success #stdin #stdout 0s 6264KB
stdin
Standard input is empty
stdout
homoCredit:     61270.18674452063
softBank:       56425.1641538431
strawberryBank: 53561.117233508194