\[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
Test:
Compound Interest
Bits:
128 bits
Bits error versus i
Bits error versus n
Time: 34.3 s
Input Error: 29.7
Output Error: 0.2
Log:
Profile: 🕒
\(\left(n \cdot i\right) \cdot \left(\frac{50}{3} \cdot i + 50\right) + 100 \cdot n\)
  1. Started with
    \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
    29.7
  2. Applied taylor to get
    \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{\frac{1}{2} \cdot {i}^2 + \left(i + \frac{1}{6} \cdot {i}^{3}\right)}{\frac{i}{n}}\]
    8.3
  3. Taylor expanded around 0 to get
    \[100 \cdot \frac{\color{red}{\frac{1}{2} \cdot {i}^2 + \left(i + \frac{1}{6} \cdot {i}^{3}\right)}}{\frac{i}{n}} \leadsto 100 \cdot \frac{\color{blue}{\frac{1}{2} \cdot {i}^2 + \left(i + \frac{1}{6} \cdot {i}^{3}\right)}}{\frac{i}{n}}\]
    8.3
  4. Applied simplify to get
    \[\color{red}{100 \cdot \frac{\frac{1}{2} \cdot {i}^2 + \left(i + \frac{1}{6} \cdot {i}^{3}\right)}{\frac{i}{n}}} \leadsto \color{blue}{\frac{100}{\frac{i}{n}} \cdot \left(i + \left(i \cdot i\right) \cdot \left(\frac{1}{6} \cdot i + \frac{1}{2}\right)\right)}\]
    9.7
  5. Applied taylor to get
    \[\frac{100}{\frac{i}{n}} \cdot \left(i + \left(i \cdot i\right) \cdot \left(\frac{1}{6} \cdot i + \frac{1}{2}\right)\right) \leadsto 100 \cdot n + \left(\frac{50}{3} \cdot \left(n \cdot {i}^2\right) + 50 \cdot \left(n \cdot i\right)\right)\]
    2.3
  6. Taylor expanded around 0 to get
    \[\color{red}{100 \cdot n + \left(\frac{50}{3} \cdot \left(n \cdot {i}^2\right) + 50 \cdot \left(n \cdot i\right)\right)} \leadsto \color{blue}{100 \cdot n + \left(\frac{50}{3} \cdot \left(n \cdot {i}^2\right) + 50 \cdot \left(n \cdot i\right)\right)}\]
    2.3
  7. Applied simplify to get
    \[100 \cdot n + \left(\frac{50}{3} \cdot \left(n \cdot {i}^2\right) + 50 \cdot \left(n \cdot i\right)\right) \leadsto 50 \cdot \left(n \cdot i\right) + \left(n \cdot 100 + \left(i \cdot i\right) \cdot \left(\frac{50}{3} \cdot n\right)\right)\]
    2.3

  8. Applied final simplification
  9. Applied simplify to get
    \[\color{red}{50 \cdot \left(n \cdot i\right) + \left(n \cdot 100 + \left(i \cdot i\right) \cdot \left(\frac{50}{3} \cdot n\right)\right)} \leadsto \color{blue}{\left(n \cdot i\right) \cdot \left(\frac{50}{3} \cdot i + 50\right) + 100 \cdot n}\]
    0.2

Original test:


(lambda ((i default) (n default))
  #:name "Compound Interest"
  (* 100 (/ (- (pow (+ 1 (/ i n)) n) 1) (/ i n)))
  #:target
  (* 100 (/ (- (exp (* n (if (= (+ 1 (/ i n)) 1) (/ i n) (/ (* (/ i n) (log (+ 1 (/ i n)))) (- (+ (/ i n) 1) 1))))) 1) (/ i n))))