\[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: 6.2 s
Input Error: 29.7
Output Error: 4.3
Log:
Profile: 🕒
\(100 \cdot \frac{n \cdot (\left({i}^2\right) * \left((i * \frac{1}{6} + \frac{1}{2})_*\right) + i)_*}{i}\)
  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.5
  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.5
  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{n \cdot 100}{i} \cdot (\left(i \cdot i\right) * \left((i * \frac{1}{6} + \frac{1}{2})_*\right) + i)_*}\]
    9.3
  5. Applied taylor to get
    \[\frac{n \cdot 100}{i} \cdot (\left(i \cdot i\right) * \left((i * \frac{1}{6} + \frac{1}{2})_*\right) + i)_* \leadsto 100 \cdot \frac{n \cdot (\left({i}^2\right) * \left((i * \frac{1}{6} + \frac{1}{2})_*\right) + i)_*}{i}\]
    4.3
  6. Taylor expanded around 0 to get
    \[\color{red}{100 \cdot \frac{n \cdot (\left({i}^2\right) * \left((i * \frac{1}{6} + \frac{1}{2})_*\right) + i)_*}{i}} \leadsto \color{blue}{100 \cdot \frac{n \cdot (\left({i}^2\right) * \left((i * \frac{1}{6} + \frac{1}{2})_*\right) + i)_*}{i}}\]
    4.3

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))))