\[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.3 s
Input Error: 29.9
Output Error: 5.1
Log:
Profile: 🕒
\(100 \cdot {\left(\frac{(i * \left(\frac{1}{2} \cdot i\right) + i)_* \cdot n}{i}\right)}^{1}\)
  1. Started with
    \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
    29.9
  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}}\]
    20.9
  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}}\]
    20.9
  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}{(i * \left(\frac{1}{2} \cdot i\right) + i)_* \cdot \frac{100}{\frac{i}{n}}}\]
    10.3
  5. Applied taylor to get
    \[(i * \left(\frac{1}{2} \cdot i\right) + i)_* \cdot \frac{100}{\frac{i}{n}} \leadsto 100 \cdot \frac{(i * \left(\frac{1}{2} \cdot i\right) + i)_* \cdot n}{i}\]
    5.1
  6. Taylor expanded around 0 to get
    \[\color{red}{100 \cdot \frac{(i * \left(\frac{1}{2} \cdot i\right) + i)_* \cdot n}{i}} \leadsto \color{blue}{100 \cdot \frac{(i * \left(\frac{1}{2} \cdot i\right) + i)_* \cdot n}{i}}\]
    5.1
  7. Using strategy rm
    5.1
  8. Applied pow1 to get
    \[100 \cdot \color{red}{\frac{(i * \left(\frac{1}{2} \cdot i\right) + i)_* \cdot n}{i}} \leadsto 100 \cdot \color{blue}{{\left(\frac{(i * \left(\frac{1}{2} \cdot i\right) + i)_* \cdot n}{i}\right)}^{1}}\]
    5.1

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