I am trying to make a payment application. Is there built-in functions for payment, interest, and principal? I have the formula for payment but how do I add an exponent to the statement? Is there an exponent operator?
Thank you
THere's no functions dedicated for payment, interest, and principal in the Swift Standard Library.
If your exponent operator means `^` in VB or Excel (or `**` in Fortran), you can use the `pow` function.
`pow(a, b)` is the equivalent to `a^b` in VB or Excel.
The `pow` function works on (Decimal, Int) in addition to (Double, Double). If you are planning to write an app including finaicial calculation,
you need to clarify how much calculation error would be accepted and if it it appropriate to use the `pow` function.