\[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: 29.9 s
Input Error: 52.6
Output Error: 0.6
Log:
Profile: 🕒
\(\frac{e^{\frac{1}{2} \cdot i} \cdot \left(100 \cdot n\right)}{{\left(e^{\frac{1}{8}}\right)}^{\left(i \cdot i\right)}}\)
  1. Started with
    \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
    52.6
  2. Applied taylor to get
    \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{\left(\frac{1}{2} \cdot {i}^2 + \left(1 + i\right)\right) - 1}{\frac{i}{n}}\]
    59.5
  3. Taylor expanded around 0 to get
    \[100 \cdot \frac{\color{red}{\left(\frac{1}{2} \cdot {i}^2 + \left(1 + i\right)\right)} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{\color{blue}{\left(\frac{1}{2} \cdot {i}^2 + \left(1 + i\right)\right)} - 1}{\frac{i}{n}}\]
    59.5
  4. Applied simplify to get
    \[\color{red}{100 \cdot \frac{\left(\frac{1}{2} \cdot {i}^2 + \left(1 + i\right)\right) - 1}{\frac{i}{n}}} \leadsto \color{blue}{\left(\frac{1}{2} \cdot i + 1\right) \cdot \frac{i \cdot 100}{\frac{i}{n}}}\]
    26.0
  5. Applied taylor to get
    \[\left(\frac{1}{2} \cdot i + 1\right) \cdot \frac{i \cdot 100}{\frac{i}{n}} \leadsto 100 \cdot n + 50 \cdot \left(n \cdot i\right)\]
    21.4
  6. Taylor expanded around 0 to get
    \[\color{red}{100 \cdot n + 50 \cdot \left(n \cdot i\right)} \leadsto \color{blue}{100 \cdot n + 50 \cdot \left(n \cdot i\right)}\]
    21.4
  7. Applied simplify to get
    \[\color{red}{100 \cdot n + 50 \cdot \left(n \cdot i\right)} \leadsto \color{blue}{\left(i \cdot 50 + 100\right) \cdot n}\]
    21.4
  8. Using strategy rm
    21.4
  9. Applied add-exp-log to get
    \[\color{red}{\left(i \cdot 50 + 100\right)} \cdot n \leadsto \color{blue}{e^{\log \left(i \cdot 50 + 100\right)}} \cdot n\]
    22.8
  10. Applied taylor to get
    \[e^{\log \left(i \cdot 50 + 100\right)} \cdot n \leadsto e^{\left(\log 100 + \frac{1}{2} \cdot i\right) - \frac{1}{8} \cdot {i}^2} \cdot n\]
    1.2
  11. Taylor expanded around 0 to get
    \[e^{\color{red}{\left(\log 100 + \frac{1}{2} \cdot i\right) - \frac{1}{8} \cdot {i}^2}} \cdot n \leadsto e^{\color{blue}{\left(\log 100 + \frac{1}{2} \cdot i\right) - \frac{1}{8} \cdot {i}^2}} \cdot n\]
    1.2
  12. Applied simplify to get
    \[e^{\left(\log 100 + \frac{1}{2} \cdot i\right) - \frac{1}{8} \cdot {i}^2} \cdot n \leadsto \frac{e^{\frac{1}{2} \cdot i} \cdot \left(100 \cdot n\right)}{{\left(e^{\frac{1}{8}}\right)}^{\left(i \cdot i\right)}}\]
    0.6

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