\[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.6 s
Input Error: 49.1
Output Error: 3.8
Log:
Profile: 🕒
\(\begin{cases} \frac{(e^{n \cdot \log_* (1 + \frac{i}{n})} - 1)^*}{\frac{\frac{i}{n}}{100}} & \text{when } i \le -1.276867142421044 \cdot 10^{-101} \\ \frac{100 \cdot n}{\frac{1}{i}} \cdot (i * \frac{1}{6} + \frac{1}{2})_* + \frac{100 \cdot n}{1} & \text{when } i \le 8.327500089582464 \cdot 10^{-165} \\ \frac{(e^{n \cdot \log_* (1 + \frac{i}{n})} - 1)^*}{\frac{\frac{i}{n}}{100}} & \text{when } i \le 5.437014226745841 \cdot 10^{+47} \\ 100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}} & \text{when } i \le 9.613916160983725 \cdot 10^{+206} \\ \frac{100}{\frac{i}{n}} \cdot (e^{n \cdot \log_* (1 + \frac{n}{i})} - 1)^* & \text{otherwise} \end{cases}\)

    if i < -1.276867142421044e-101

    1. Started with
      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
      36.0
    2. Using strategy rm
      36.0
    3. Applied add-exp-log to get
      \[100 \cdot \frac{{\color{red}{\left(1 + \frac{i}{n}\right)}}^{n} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{{\color{blue}{\left(e^{\log \left(1 + \frac{i}{n}\right)}\right)}}^{n} - 1}{\frac{i}{n}}\]
      36.0
    4. Applied pow-exp to get
      \[100 \cdot \frac{\color{red}{{\left(e^{\log \left(1 + \frac{i}{n}\right)}\right)}^{n}} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{\color{blue}{e^{\log \left(1 + \frac{i}{n}\right) \cdot n}} - 1}{\frac{i}{n}}\]
      36.0
    5. Applied simplify to get
      \[100 \cdot \frac{e^{\color{red}{\log \left(1 + \frac{i}{n}\right) \cdot n}} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{e^{\color{blue}{\log_* (1 + \frac{i}{n}) \cdot n}} - 1}{\frac{i}{n}}\]
      19.2
    6. Applied taylor to get
      \[100 \cdot \frac{e^{\log_* (1 + \frac{i}{n}) \cdot n} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{e^{n \cdot \log_* (1 + \frac{i}{n})} - 1}{\frac{i}{n}}\]
      19.2
    7. Taylor expanded around 0 to get
      \[100 \cdot \frac{e^{\color{red}{n \cdot \log_* (1 + \frac{i}{n})}} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{e^{\color{blue}{n \cdot \log_* (1 + \frac{i}{n})}} - 1}{\frac{i}{n}}\]
      19.2
    8. Applied simplify to get
      \[100 \cdot \frac{e^{n \cdot \log_* (1 + \frac{i}{n})} - 1}{\frac{i}{n}} \leadsto \frac{(e^{n \cdot \log_* (1 + \frac{i}{n})} - 1)^*}{\frac{\frac{i}{n}}{100}}\]
      1.8

    9. Applied final simplification

    if -1.276867142421044e-101 < i < 8.327500089582464e-165

    1. Started with
      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
      61.5
    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}}\]
      19.1
    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}}\]
      19.1
    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)_*}\]
      20.2
    5. Using strategy rm
      20.2
    6. Applied fma-udef to get
      \[\frac{n \cdot 100}{i} \cdot \color{red}{(\left(i \cdot i\right) * \left((i * \frac{1}{6} + \frac{1}{2})_*\right) + i)_*} \leadsto \frac{n \cdot 100}{i} \cdot \color{blue}{\left(\left(i \cdot i\right) \cdot (i * \frac{1}{6} + \frac{1}{2})_* + i\right)}\]
      20.2
    7. Applied distribute-lft-in to get
      \[\color{red}{\frac{n \cdot 100}{i} \cdot \left(\left(i \cdot i\right) \cdot (i * \frac{1}{6} + \frac{1}{2})_* + i\right)} \leadsto \color{blue}{\frac{n \cdot 100}{i} \cdot \left(\left(i \cdot i\right) \cdot (i * \frac{1}{6} + \frac{1}{2})_*\right) + \frac{n \cdot 100}{i} \cdot i}\]
      20.8
    8. Applied simplify to get
      \[\color{red}{\frac{n \cdot 100}{i} \cdot \left(\left(i \cdot i\right) \cdot (i * \frac{1}{6} + \frac{1}{2})_*\right)} + \frac{n \cdot 100}{i} \cdot i \leadsto \color{blue}{\frac{100 \cdot n}{\frac{1}{i}} \cdot (i * \frac{1}{6} + \frac{1}{2})_*} + \frac{n \cdot 100}{i} \cdot i\]
      20.2
    9. Applied simplify to get
      \[\frac{100 \cdot n}{\frac{1}{i}} \cdot (i * \frac{1}{6} + \frac{1}{2})_* + \color{red}{\frac{n \cdot 100}{i} \cdot i} \leadsto \frac{100 \cdot n}{\frac{1}{i}} \cdot (i * \frac{1}{6} + \frac{1}{2})_* + \color{blue}{\frac{100 \cdot n}{1}}\]
      0.0

    if 8.327500089582464e-165 < i < 5.437014226745841e+47

    1. Started with
      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
      52.6
    2. Using strategy rm
      52.6
    3. Applied add-exp-log to get
      \[100 \cdot \frac{{\color{red}{\left(1 + \frac{i}{n}\right)}}^{n} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{{\color{blue}{\left(e^{\log \left(1 + \frac{i}{n}\right)}\right)}}^{n} - 1}{\frac{i}{n}}\]
      52.6
    4. Applied pow-exp to get
      \[100 \cdot \frac{\color{red}{{\left(e^{\log \left(1 + \frac{i}{n}\right)}\right)}^{n}} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{\color{blue}{e^{\log \left(1 + \frac{i}{n}\right) \cdot n}} - 1}{\frac{i}{n}}\]
      52.6
    5. Applied simplify to get
      \[100 \cdot \frac{e^{\color{red}{\log \left(1 + \frac{i}{n}\right) \cdot n}} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{e^{\color{blue}{\log_* (1 + \frac{i}{n}) \cdot n}} - 1}{\frac{i}{n}}\]
      50.1
    6. Applied taylor to get
      \[100 \cdot \frac{e^{\log_* (1 + \frac{i}{n}) \cdot n} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{e^{n \cdot \log_* (1 + \frac{i}{n})} - 1}{\frac{i}{n}}\]
      50.1
    7. Taylor expanded around 0 to get
      \[100 \cdot \frac{e^{\color{red}{n \cdot \log_* (1 + \frac{i}{n})}} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{e^{\color{blue}{n \cdot \log_* (1 + \frac{i}{n})}} - 1}{\frac{i}{n}}\]
      50.1
    8. Applied simplify to get
      \[100 \cdot \frac{e^{n \cdot \log_* (1 + \frac{i}{n})} - 1}{\frac{i}{n}} \leadsto \frac{(e^{n \cdot \log_* (1 + \frac{i}{n})} - 1)^*}{\frac{\frac{i}{n}}{100}}\]
      8.6

    9. Applied final simplification

    if 5.437014226745841e+47 < i < 9.613916160983725e+206

    1. Started with
      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
      31.1

    if 9.613916160983725e+206 < i

    1. Started with
      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
      41.6
    2. Using strategy rm
      41.6
    3. Applied add-exp-log to get
      \[100 \cdot \frac{{\color{red}{\left(1 + \frac{i}{n}\right)}}^{n} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{{\color{blue}{\left(e^{\log \left(1 + \frac{i}{n}\right)}\right)}}^{n} - 1}{\frac{i}{n}}\]
      60.1
    4. Applied pow-exp to get
      \[100 \cdot \frac{\color{red}{{\left(e^{\log \left(1 + \frac{i}{n}\right)}\right)}^{n}} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{\color{blue}{e^{\log \left(1 + \frac{i}{n}\right) \cdot n}} - 1}{\frac{i}{n}}\]
      60.1
    5. Applied simplify to get
      \[100 \cdot \frac{e^{\color{red}{\log \left(1 + \frac{i}{n}\right) \cdot n}} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{e^{\color{blue}{\log_* (1 + \frac{i}{n}) \cdot n}} - 1}{\frac{i}{n}}\]
      60.1
    6. Applied taylor to get
      \[100 \cdot \frac{e^{\log_* (1 + \frac{i}{n}) \cdot n} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{e^{n \cdot \log_* (1 + \frac{n}{i})} - 1}{\frac{i}{n}}\]
      8.4
    7. Taylor expanded around inf to get
      \[100 \cdot \frac{e^{\color{red}{n \cdot \log_* (1 + \frac{n}{i})}} - 1}{\frac{i}{n}} \leadsto 100 \cdot \frac{e^{\color{blue}{n \cdot \log_* (1 + \frac{n}{i})}} - 1}{\frac{i}{n}}\]
      8.4
    8. Applied simplify to get
      \[100 \cdot \frac{e^{n \cdot \log_* (1 + \frac{n}{i})} - 1}{\frac{i}{n}} \leadsto \frac{100}{\frac{i}{n}} \cdot (e^{n \cdot \log_* (1 + \frac{n}{i})} - 1)^*\]
      0.1

    9. Applied final simplification

  1. Removed slow pow expressions

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