Average Error: 47.9 → 9.8
Time: 10.7s
Precision: binary64
\[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}} \]
\[\begin{array}{l} t_0 := {n}^{3} \cdot \log n\\ t_1 := {\log i}^{2}\\ t_2 := {\log n}^{2}\\ \mathbf{if}\;i \leq -4.1792557626145816 \cdot 10^{-5}:\\ \;\;\;\;n \cdot \frac{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}{i}\\ \mathbf{elif}\;i \leq 2.0468150397214818 \cdot 10^{-5}:\\ \;\;\;\;n \cdot \left(\left(100 + \left(\mathsf{fma}\left(i \cdot i, 16.666666666666668, 33.333333333333336 \cdot \left(\frac{i}{n} \cdot \frac{i}{n}\right)\right) + 50 \cdot \left(i - \frac{i}{n}\right)\right)\right) - 50 \cdot \frac{i \cdot i}{n}\right)\\ \mathbf{else}:\\ \;\;\;\;n \cdot \left(\mathsf{fma}\left(50, \frac{\log i \cdot \left({n}^{3} \cdot t_2\right)}{i}, \mathsf{fma}\left(100, \frac{\log i \cdot {n}^{3}}{i \cdot i}, \mathsf{fma}\left(100, \frac{n \cdot \log i}{i}, \mathsf{fma}\left(50, \frac{\left(n \cdot n\right) \cdot t_1}{i}, \mathsf{fma}\left(16.666666666666668, \frac{{n}^{3} \cdot {\log i}^{3}}{i}, \mathsf{fma}\left(100, \frac{n}{i} \cdot \frac{n}{i}, 50 \cdot \frac{t_2 \cdot \left(n \cdot n\right)}{i}\right)\right)\right)\right)\right)\right) - \mathsf{fma}\left(100, \frac{t_0}{i \cdot i}, \mathsf{fma}\left(16.666666666666668, \frac{{n}^{3} \cdot {\log n}^{3}}{i}, \mathsf{fma}\left(50, {\left(\frac{n}{i}\right)}^{3}, \mathsf{fma}\left(100, \frac{\left(n \cdot n\right) \cdot \left(\log i \cdot \log n\right)}{i}, \mathsf{fma}\left(50, \frac{t_1 \cdot t_0}{i}, 100 \cdot \frac{n \cdot \log n}{i}\right)\right)\right)\right)\right)\right)\\ \end{array} \]
(FPCore (i n)
 :precision binary64
 (* 100.0 (/ (- (pow (+ 1.0 (/ i n)) n) 1.0) (/ i n))))
(FPCore (i n)
 :precision binary64
 (let* ((t_0 (* (pow n 3.0) (log n)))
        (t_1 (pow (log i) 2.0))
        (t_2 (pow (log n) 2.0)))
   (if (<= i -4.1792557626145816e-5)
     (* n (/ (fma 100.0 (exp (* n (log1p (/ i n)))) -100.0) i))
     (if (<= i 2.0468150397214818e-5)
       (*
        n
        (-
         (+
          100.0
          (+
           (fma
            (* i i)
            16.666666666666668
            (* 33.333333333333336 (* (/ i n) (/ i n))))
           (* 50.0 (- i (/ i n)))))
         (* 50.0 (/ (* i i) n))))
       (*
        n
        (-
         (fma
          50.0
          (/ (* (log i) (* (pow n 3.0) t_2)) i)
          (fma
           100.0
           (/ (* (log i) (pow n 3.0)) (* i i))
           (fma
            100.0
            (/ (* n (log i)) i)
            (fma
             50.0
             (/ (* (* n n) t_1) i)
             (fma
              16.666666666666668
              (/ (* (pow n 3.0) (pow (log i) 3.0)) i)
              (fma
               100.0
               (* (/ n i) (/ n i))
               (* 50.0 (/ (* t_2 (* n n)) i))))))))
         (fma
          100.0
          (/ t_0 (* i i))
          (fma
           16.666666666666668
           (/ (* (pow n 3.0) (pow (log n) 3.0)) i)
           (fma
            50.0
            (pow (/ n i) 3.0)
            (fma
             100.0
             (/ (* (* n n) (* (log i) (log n))) i)
             (fma
              50.0
              (/ (* t_1 t_0) i)
              (* 100.0 (/ (* n (log n)) i)))))))))))))
double code(double i, double n) {
	return 100.0 * ((pow((1.0 + (i / n)), n) - 1.0) / (i / n));
}
double code(double i, double n) {
	double t_0 = pow(n, 3.0) * log(n);
	double t_1 = pow(log(i), 2.0);
	double t_2 = pow(log(n), 2.0);
	double tmp;
	if (i <= -4.1792557626145816e-5) {
		tmp = n * (fma(100.0, exp((n * log1p((i / n)))), -100.0) / i);
	} else if (i <= 2.0468150397214818e-5) {
		tmp = n * ((100.0 + (fma((i * i), 16.666666666666668, (33.333333333333336 * ((i / n) * (i / n)))) + (50.0 * (i - (i / n))))) - (50.0 * ((i * i) / n)));
	} else {
		tmp = n * (fma(50.0, ((log(i) * (pow(n, 3.0) * t_2)) / i), fma(100.0, ((log(i) * pow(n, 3.0)) / (i * i)), fma(100.0, ((n * log(i)) / i), fma(50.0, (((n * n) * t_1) / i), fma(16.666666666666668, ((pow(n, 3.0) * pow(log(i), 3.0)) / i), fma(100.0, ((n / i) * (n / i)), (50.0 * ((t_2 * (n * n)) / i)))))))) - fma(100.0, (t_0 / (i * i)), fma(16.666666666666668, ((pow(n, 3.0) * pow(log(n), 3.0)) / i), fma(50.0, pow((n / i), 3.0), fma(100.0, (((n * n) * (log(i) * log(n))) / i), fma(50.0, ((t_1 * t_0) / i), (100.0 * ((n * log(n)) / i))))))));
	}
	return tmp;
}
function code(i, n)
	return Float64(100.0 * Float64(Float64((Float64(1.0 + Float64(i / n)) ^ n) - 1.0) / Float64(i / n)))
end
function code(i, n)
	t_0 = Float64((n ^ 3.0) * log(n))
	t_1 = log(i) ^ 2.0
	t_2 = log(n) ^ 2.0
	tmp = 0.0
	if (i <= -4.1792557626145816e-5)
		tmp = Float64(n * Float64(fma(100.0, exp(Float64(n * log1p(Float64(i / n)))), -100.0) / i));
	elseif (i <= 2.0468150397214818e-5)
		tmp = Float64(n * Float64(Float64(100.0 + Float64(fma(Float64(i * i), 16.666666666666668, Float64(33.333333333333336 * Float64(Float64(i / n) * Float64(i / n)))) + Float64(50.0 * Float64(i - Float64(i / n))))) - Float64(50.0 * Float64(Float64(i * i) / n))));
	else
		tmp = Float64(n * Float64(fma(50.0, Float64(Float64(log(i) * Float64((n ^ 3.0) * t_2)) / i), fma(100.0, Float64(Float64(log(i) * (n ^ 3.0)) / Float64(i * i)), fma(100.0, Float64(Float64(n * log(i)) / i), fma(50.0, Float64(Float64(Float64(n * n) * t_1) / i), fma(16.666666666666668, Float64(Float64((n ^ 3.0) * (log(i) ^ 3.0)) / i), fma(100.0, Float64(Float64(n / i) * Float64(n / i)), Float64(50.0 * Float64(Float64(t_2 * Float64(n * n)) / i)))))))) - fma(100.0, Float64(t_0 / Float64(i * i)), fma(16.666666666666668, Float64(Float64((n ^ 3.0) * (log(n) ^ 3.0)) / i), fma(50.0, (Float64(n / i) ^ 3.0), fma(100.0, Float64(Float64(Float64(n * n) * Float64(log(i) * log(n))) / i), fma(50.0, Float64(Float64(t_1 * t_0) / i), Float64(100.0 * Float64(Float64(n * log(n)) / i)))))))));
	end
	return tmp
end
code[i_, n_] := N[(100.0 * N[(N[(N[Power[N[(1.0 + N[(i / n), $MachinePrecision]), $MachinePrecision], n], $MachinePrecision] - 1.0), $MachinePrecision] / N[(i / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[i_, n_] := Block[{t$95$0 = N[(N[Power[n, 3.0], $MachinePrecision] * N[Log[n], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Log[i], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Log[n], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[i, -4.1792557626145816e-5], N[(n * N[(N[(100.0 * N[Exp[N[(n * N[Log[1 + N[(i / n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + -100.0), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.0468150397214818e-5], N[(n * N[(N[(100.0 + N[(N[(N[(i * i), $MachinePrecision] * 16.666666666666668 + N[(33.333333333333336 * N[(N[(i / n), $MachinePrecision] * N[(i / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(50.0 * N[(i - N[(i / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(50.0 * N[(N[(i * i), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(n * N[(N[(50.0 * N[(N[(N[Log[i], $MachinePrecision] * N[(N[Power[n, 3.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision] + N[(100.0 * N[(N[(N[Log[i], $MachinePrecision] * N[Power[n, 3.0], $MachinePrecision]), $MachinePrecision] / N[(i * i), $MachinePrecision]), $MachinePrecision] + N[(100.0 * N[(N[(n * N[Log[i], $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision] + N[(50.0 * N[(N[(N[(n * n), $MachinePrecision] * t$95$1), $MachinePrecision] / i), $MachinePrecision] + N[(16.666666666666668 * N[(N[(N[Power[n, 3.0], $MachinePrecision] * N[Power[N[Log[i], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision] + N[(100.0 * N[(N[(n / i), $MachinePrecision] * N[(n / i), $MachinePrecision]), $MachinePrecision] + N[(50.0 * N[(N[(t$95$2 * N[(n * n), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(100.0 * N[(t$95$0 / N[(i * i), $MachinePrecision]), $MachinePrecision] + N[(16.666666666666668 * N[(N[(N[Power[n, 3.0], $MachinePrecision] * N[Power[N[Log[n], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision] + N[(50.0 * N[Power[N[(n / i), $MachinePrecision], 3.0], $MachinePrecision] + N[(100.0 * N[(N[(N[(n * n), $MachinePrecision] * N[(N[Log[i], $MachinePrecision] * N[Log[n], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision] + N[(50.0 * N[(N[(t$95$1 * t$95$0), $MachinePrecision] / i), $MachinePrecision] + N[(100.0 * N[(N[(n * N[Log[n], $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}
\begin{array}{l}
t_0 := {n}^{3} \cdot \log n\\
t_1 := {\log i}^{2}\\
t_2 := {\log n}^{2}\\
\mathbf{if}\;i \leq -4.1792557626145816 \cdot 10^{-5}:\\
\;\;\;\;n \cdot \frac{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}{i}\\

\mathbf{elif}\;i \leq 2.0468150397214818 \cdot 10^{-5}:\\
\;\;\;\;n \cdot \left(\left(100 + \left(\mathsf{fma}\left(i \cdot i, 16.666666666666668, 33.333333333333336 \cdot \left(\frac{i}{n} \cdot \frac{i}{n}\right)\right) + 50 \cdot \left(i - \frac{i}{n}\right)\right)\right) - 50 \cdot \frac{i \cdot i}{n}\right)\\

\mathbf{else}:\\
\;\;\;\;n \cdot \left(\mathsf{fma}\left(50, \frac{\log i \cdot \left({n}^{3} \cdot t_2\right)}{i}, \mathsf{fma}\left(100, \frac{\log i \cdot {n}^{3}}{i \cdot i}, \mathsf{fma}\left(100, \frac{n \cdot \log i}{i}, \mathsf{fma}\left(50, \frac{\left(n \cdot n\right) \cdot t_1}{i}, \mathsf{fma}\left(16.666666666666668, \frac{{n}^{3} \cdot {\log i}^{3}}{i}, \mathsf{fma}\left(100, \frac{n}{i} \cdot \frac{n}{i}, 50 \cdot \frac{t_2 \cdot \left(n \cdot n\right)}{i}\right)\right)\right)\right)\right)\right) - \mathsf{fma}\left(100, \frac{t_0}{i \cdot i}, \mathsf{fma}\left(16.666666666666668, \frac{{n}^{3} \cdot {\log n}^{3}}{i}, \mathsf{fma}\left(50, {\left(\frac{n}{i}\right)}^{3}, \mathsf{fma}\left(100, \frac{\left(n \cdot n\right) \cdot \left(\log i \cdot \log n\right)}{i}, \mathsf{fma}\left(50, \frac{t_1 \cdot t_0}{i}, 100 \cdot \frac{n \cdot \log n}{i}\right)\right)\right)\right)\right)\right)\\


\end{array}

Error

Bits error versus i

Bits error versus n

Target

Original47.9
Target47.2
Herbie9.8
\[100 \cdot \frac{e^{n \cdot \begin{array}{l} \mathbf{if}\;1 + \frac{i}{n} = 1:\\ \;\;\;\;\frac{i}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{i}{n} \cdot \log \left(1 + \frac{i}{n}\right)}{\left(\frac{i}{n} + 1\right) - 1}\\ \end{array}} - 1}{\frac{i}{n}} \]

Derivation

  1. Split input into 3 regimes
  2. if i < -4.1792557626145816e-5

    1. Initial program 28.7

      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}} \]
    2. Simplified29.1

      \[\leadsto \color{blue}{n \cdot \frac{\mathsf{fma}\left(100, {\left(1 + \frac{i}{n}\right)}^{n}, -100\right)}{i}} \]
    3. Applied pow-to-exp_binary6429.1

      \[\leadsto n \cdot \frac{\mathsf{fma}\left(100, \color{blue}{e^{\log \left(1 + \frac{i}{n}\right) \cdot n}}, -100\right)}{i} \]
    4. Simplified6.0

      \[\leadsto n \cdot \frac{\mathsf{fma}\left(100, e^{\color{blue}{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}}, -100\right)}{i} \]

    if -4.1792557626145816e-5 < i < 2.0468150397214818e-5

    1. Initial program 58.4

      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}} \]
    2. Simplified58.1

      \[\leadsto \color{blue}{n \cdot \frac{\mathsf{fma}\left(100, {\left(1 + \frac{i}{n}\right)}^{n}, -100\right)}{i}} \]
    3. Taylor expanded in i around 0 13.1

      \[\leadsto n \cdot \color{blue}{\left(\left(100 + \left(50 \cdot i + \left(16.666666666666668 \cdot {i}^{2} + 33.333333333333336 \cdot \frac{{i}^{2}}{{n}^{2}}\right)\right)\right) - \left(50 \cdot \frac{i}{n} + 50 \cdot \frac{{i}^{2}}{n}\right)\right)} \]
    4. Simplified8.7

      \[\leadsto n \cdot \color{blue}{\left(\left(100 + \mathsf{fma}\left(50, i, \mathsf{fma}\left(16.666666666666668, i \cdot i, 33.333333333333336 \cdot \left(\frac{i}{n} \cdot \frac{i}{n}\right)\right)\right)\right) - 50 \cdot \left(\frac{i}{n} + \frac{i \cdot i}{n}\right)\right)} \]
    5. Applied distribute-lft-in_binary648.7

      \[\leadsto n \cdot \left(\left(100 + \mathsf{fma}\left(50, i, \mathsf{fma}\left(16.666666666666668, i \cdot i, 33.333333333333336 \cdot \left(\frac{i}{n} \cdot \frac{i}{n}\right)\right)\right)\right) - \color{blue}{\left(50 \cdot \frac{i}{n} + 50 \cdot \frac{i \cdot i}{n}\right)}\right) \]
    6. Applied associate--r+_binary648.7

      \[\leadsto n \cdot \color{blue}{\left(\left(\left(100 + \mathsf{fma}\left(50, i, \mathsf{fma}\left(16.666666666666668, i \cdot i, 33.333333333333336 \cdot \left(\frac{i}{n} \cdot \frac{i}{n}\right)\right)\right)\right) - 50 \cdot \frac{i}{n}\right) - 50 \cdot \frac{i \cdot i}{n}\right)} \]
    7. Simplified8.7

      \[\leadsto n \cdot \left(\color{blue}{\left(100 + \left(\mathsf{fma}\left(i \cdot i, 16.666666666666668, 33.333333333333336 \cdot \left(\frac{i}{n} \cdot \frac{i}{n}\right)\right) + 50 \cdot \left(i - \frac{i}{n}\right)\right)\right)} - 50 \cdot \frac{i \cdot i}{n}\right) \]

    if 2.0468150397214818e-5 < i

    1. Initial program 32.6

      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}} \]
    2. Simplified32.5

      \[\leadsto \color{blue}{n \cdot \frac{\mathsf{fma}\left(100, {\left(1 + \frac{i}{n}\right)}^{n}, -100\right)}{i}} \]
    3. Taylor expanded in n around 0 21.3

      \[\leadsto n \cdot \color{blue}{\left(\left(50 \cdot \frac{\log i \cdot \left({n}^{3} \cdot {\log n}^{2}\right)}{i} + \left(100 \cdot \frac{\log i \cdot {n}^{3}}{{i}^{2}} + \left(100 \cdot \frac{n \cdot \log i}{i} + \left(50 \cdot \frac{{n}^{2} \cdot {\log i}^{2}}{i} + \left(16.666666666666668 \cdot \frac{{\log i}^{3} \cdot {n}^{3}}{i} + \left(100 \cdot \frac{{n}^{2}}{{i}^{2}} + 50 \cdot \frac{{n}^{2} \cdot {\log n}^{2}}{i}\right)\right)\right)\right)\right)\right) - \left(100 \cdot \frac{{n}^{3} \cdot \log n}{{i}^{2}} + \left(16.666666666666668 \cdot \frac{{n}^{3} \cdot {\log n}^{3}}{i} + \left(50 \cdot \frac{{n}^{3}}{{i}^{3}} + \left(100 \cdot \frac{{n}^{2} \cdot \left(\log i \cdot \log n\right)}{i} + \left(50 \cdot \frac{{\log i}^{2} \cdot \left({n}^{3} \cdot \log n\right)}{i} + 100 \cdot \frac{n \cdot \log n}{i}\right)\right)\right)\right)\right)\right)} \]
    4. Simplified21.3

      \[\leadsto n \cdot \color{blue}{\left(\mathsf{fma}\left(50, \frac{\log i \cdot \left({n}^{3} \cdot {\log n}^{2}\right)}{i}, \mathsf{fma}\left(100, \frac{{n}^{3} \cdot \log i}{i \cdot i}, \mathsf{fma}\left(100, \frac{n \cdot \log i}{i}, \mathsf{fma}\left(50, \frac{\left(n \cdot n\right) \cdot {\log i}^{2}}{i}, \mathsf{fma}\left(16.666666666666668, \frac{{n}^{3} \cdot {\log i}^{3}}{i}, \mathsf{fma}\left(100, \frac{n}{i} \cdot \frac{n}{i}, 50 \cdot \frac{\left(n \cdot n\right) \cdot {\log n}^{2}}{i}\right)\right)\right)\right)\right)\right) - \mathsf{fma}\left(100, \frac{{n}^{3} \cdot \log n}{i \cdot i}, \mathsf{fma}\left(16.666666666666668, \frac{{n}^{3} \cdot {\log n}^{3}}{i}, \mathsf{fma}\left(50, {\left(\frac{n}{i}\right)}^{3}, \mathsf{fma}\left(100, \frac{\left(n \cdot n\right) \cdot \left(\log i \cdot \log n\right)}{i}, \mathsf{fma}\left(50, \frac{{\log i}^{2} \cdot \left({n}^{3} \cdot \log n\right)}{i}, 100 \cdot \frac{n \cdot \log n}{i}\right)\right)\right)\right)\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification9.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -4.1792557626145816 \cdot 10^{-5}:\\ \;\;\;\;n \cdot \frac{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}{i}\\ \mathbf{elif}\;i \leq 2.0468150397214818 \cdot 10^{-5}:\\ \;\;\;\;n \cdot \left(\left(100 + \left(\mathsf{fma}\left(i \cdot i, 16.666666666666668, 33.333333333333336 \cdot \left(\frac{i}{n} \cdot \frac{i}{n}\right)\right) + 50 \cdot \left(i - \frac{i}{n}\right)\right)\right) - 50 \cdot \frac{i \cdot i}{n}\right)\\ \mathbf{else}:\\ \;\;\;\;n \cdot \left(\mathsf{fma}\left(50, \frac{\log i \cdot \left({n}^{3} \cdot {\log n}^{2}\right)}{i}, \mathsf{fma}\left(100, \frac{\log i \cdot {n}^{3}}{i \cdot i}, \mathsf{fma}\left(100, \frac{n \cdot \log i}{i}, \mathsf{fma}\left(50, \frac{\left(n \cdot n\right) \cdot {\log i}^{2}}{i}, \mathsf{fma}\left(16.666666666666668, \frac{{n}^{3} \cdot {\log i}^{3}}{i}, \mathsf{fma}\left(100, \frac{n}{i} \cdot \frac{n}{i}, 50 \cdot \frac{{\log n}^{2} \cdot \left(n \cdot n\right)}{i}\right)\right)\right)\right)\right)\right) - \mathsf{fma}\left(100, \frac{{n}^{3} \cdot \log n}{i \cdot i}, \mathsf{fma}\left(16.666666666666668, \frac{{n}^{3} \cdot {\log n}^{3}}{i}, \mathsf{fma}\left(50, {\left(\frac{n}{i}\right)}^{3}, \mathsf{fma}\left(100, \frac{\left(n \cdot n\right) \cdot \left(\log i \cdot \log n\right)}{i}, \mathsf{fma}\left(50, \frac{{\log i}^{2} \cdot \left({n}^{3} \cdot \log n\right)}{i}, 100 \cdot \frac{n \cdot \log n}{i}\right)\right)\right)\right)\right)\right)\\ \end{array} \]

Reproduce

herbie shell --seed 2022131 
(FPCore (i n)
  :name "Compound Interest"
  :precision binary64

  :herbie-target
  (* 100.0 (/ (- (exp (* n (if (== (+ 1.0 (/ i n)) 1.0) (/ i n) (/ (* (/ i n) (log (+ 1.0 (/ i n)))) (- (+ (/ i n) 1.0) 1.0))))) 1.0) (/ i n)))

  (* 100.0 (/ (- (pow (+ 1.0 (/ i n)) n) 1.0) (/ i n))))