\[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: 38.5 s
Input Error: 29.6
Output Error: 0.2
Log:
Profile: 🕒
\(\left({\left(e^{\frac{1}{24}}\right)}^{\left(i \cdot i\right)} \cdot 100\right) \cdot \left(n \cdot e^{\frac{1}{2} \cdot i}\right)\)
  1. Started with
    \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
    29.6
  2. Using strategy rm
    29.6
  3. Applied add-exp-log to get
    \[100 \cdot \color{red}{\frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}} \leadsto 100 \cdot \color{blue}{e^{\log \left(\frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\right)}}\]
    29.8
  4. Applied taylor to get
    \[100 \cdot e^{\log \left(\frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\right)} \leadsto 100 \cdot e^{\frac{1}{24} \cdot {i}^2 + \left(\log n + \frac{1}{2} \cdot i\right)}\]
    17.5
  5. Taylor expanded around 0 to get
    \[100 \cdot e^{\color{red}{\frac{1}{24} \cdot {i}^2 + \left(\log n + \frac{1}{2} \cdot i\right)}} \leadsto 100 \cdot e^{\color{blue}{\frac{1}{24} \cdot {i}^2 + \left(\log n + \frac{1}{2} \cdot i\right)}}\]
    17.5
  6. Applied simplify to get
    \[100 \cdot e^{\frac{1}{24} \cdot {i}^2 + \left(\log n + \frac{1}{2} \cdot i\right)} \leadsto \left({\left(e^{\frac{1}{24}}\right)}^{\left(i \cdot i\right)} \cdot 100\right) \cdot \left(n \cdot e^{\frac{1}{2} \cdot i}\right)\]
    0.2

  7. Applied final simplification

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