Average Error: 42.6 → 29.6
Time: 20.7s
Precision: 64
\[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
\[\begin{array}{l} \mathbf{if}\;n \le -6.246516767500982 \cdot 10^{+112}:\\ \;\;\;\;\frac{\mathsf{fma}\left(50, i \cdot i, \mathsf{fma}\left(\frac{50}{3} \cdot i, i \cdot i, i \cdot 100\right)\right)}{\frac{i}{n}}\\ \mathbf{elif}\;n \le -1.0933259526011947 \cdot 10^{+64}:\\ \;\;\;\;\frac{\mathsf{fma}\left(100, {\left(1 + \frac{i}{n}\right)}^{n}, -100\right)}{i} \cdot n\\ \mathbf{elif}\;n \le -0.13295556128930017:\\ \;\;\;\;\frac{\mathsf{fma}\left(50, i \cdot i, \mathsf{fma}\left(\frac{50}{3} \cdot i, i \cdot i, i \cdot 100\right)\right)}{\frac{i}{n}}\\ \mathbf{elif}\;n \le -1.7065727457962 \cdot 10^{-312}:\\ \;\;\;\;\frac{1}{i} \cdot \left(\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right) \cdot n\right)\\ \mathbf{elif}\;n \le 5.811229823508011 \cdot 10^{-78}:\\ \;\;\;\;\frac{\mathsf{fma}\left(50 \cdot \left(n \cdot n\right), \log n \cdot \log n, \mathsf{fma}\left(\left(\left(n \cdot n\right) \cdot n\right) \cdot \frac{50}{3}, \log i \cdot \left(\log i \cdot \log i\right), \mathsf{fma}\left(n \cdot \log i, 100, \mathsf{fma}\left(\frac{100}{3}, \left(\log n \cdot \log n\right) \cdot \left(\log i \cdot \left(\left(n \cdot n\right) \cdot n\right)\right), \mathsf{fma}\left(\frac{50}{3}, \left(\log n \cdot \log n\right) \cdot \left(\log i \cdot \left(\left(n \cdot n\right) \cdot n\right)\right), \left(\log i \cdot \log i\right) \cdot \left(50 \cdot \left(n \cdot n\right)\right)\right)\right)\right)\right)\right) - \mathsf{fma}\left(\left(\left(n \cdot n\right) \cdot n\right) \cdot \frac{100}{3}, \log n \cdot \left(\log i \cdot \log i\right), \mathsf{fma}\left(50 \cdot \left(n \cdot n\right), \log n \cdot \log i, \mathsf{fma}\left(50 \cdot \left(n \cdot n\right), \log n \cdot \log i, \left(n \cdot 100\right) \cdot \log n + \left(\left(\left(n \cdot n\right) \cdot n\right) \cdot \frac{50}{3}\right) \cdot \left(\log n \cdot \left(\log i \cdot \log i\right) + \left(\log n \cdot \log n\right) \cdot \log n\right)\right)\right)\right)}{\frac{i}{n}}\\ \mathbf{elif}\;n \le 2.5555363937413246 \cdot 10^{+221}:\\ \;\;\;\;\frac{\mathsf{fma}\left(50, i \cdot i, \mathsf{fma}\left(\frac{50}{3} \cdot i, i \cdot i, i \cdot 100\right)\right)}{\frac{i}{n}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)} \cdot \sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\frac{i}{n}} \cdot \left(\sqrt[3]{\sqrt[3]{\frac{i}{n}} \cdot \sqrt[3]{\frac{i}{n}}} \cdot \sqrt[3]{\sqrt[3]{\sqrt[3]{\frac{i}{n}}} \cdot \left(\sqrt[3]{\sqrt[3]{\frac{i}{n}}} \cdot \sqrt[3]{\sqrt[3]{\frac{i}{n}}}\right)}\right)} \cdot \frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\frac{i}{n}}}\\ \end{array}\]
100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}
\begin{array}{l}
\mathbf{if}\;n \le -6.246516767500982 \cdot 10^{+112}:\\
\;\;\;\;\frac{\mathsf{fma}\left(50, i \cdot i, \mathsf{fma}\left(\frac{50}{3} \cdot i, i \cdot i, i \cdot 100\right)\right)}{\frac{i}{n}}\\

\mathbf{elif}\;n \le -1.0933259526011947 \cdot 10^{+64}:\\
\;\;\;\;\frac{\mathsf{fma}\left(100, {\left(1 + \frac{i}{n}\right)}^{n}, -100\right)}{i} \cdot n\\

\mathbf{elif}\;n \le -0.13295556128930017:\\
\;\;\;\;\frac{\mathsf{fma}\left(50, i \cdot i, \mathsf{fma}\left(\frac{50}{3} \cdot i, i \cdot i, i \cdot 100\right)\right)}{\frac{i}{n}}\\

\mathbf{elif}\;n \le -1.7065727457962 \cdot 10^{-312}:\\
\;\;\;\;\frac{1}{i} \cdot \left(\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right) \cdot n\right)\\

\mathbf{elif}\;n \le 5.811229823508011 \cdot 10^{-78}:\\
\;\;\;\;\frac{\mathsf{fma}\left(50 \cdot \left(n \cdot n\right), \log n \cdot \log n, \mathsf{fma}\left(\left(\left(n \cdot n\right) \cdot n\right) \cdot \frac{50}{3}, \log i \cdot \left(\log i \cdot \log i\right), \mathsf{fma}\left(n \cdot \log i, 100, \mathsf{fma}\left(\frac{100}{3}, \left(\log n \cdot \log n\right) \cdot \left(\log i \cdot \left(\left(n \cdot n\right) \cdot n\right)\right), \mathsf{fma}\left(\frac{50}{3}, \left(\log n \cdot \log n\right) \cdot \left(\log i \cdot \left(\left(n \cdot n\right) \cdot n\right)\right), \left(\log i \cdot \log i\right) \cdot \left(50 \cdot \left(n \cdot n\right)\right)\right)\right)\right)\right)\right) - \mathsf{fma}\left(\left(\left(n \cdot n\right) \cdot n\right) \cdot \frac{100}{3}, \log n \cdot \left(\log i \cdot \log i\right), \mathsf{fma}\left(50 \cdot \left(n \cdot n\right), \log n \cdot \log i, \mathsf{fma}\left(50 \cdot \left(n \cdot n\right), \log n \cdot \log i, \left(n \cdot 100\right) \cdot \log n + \left(\left(\left(n \cdot n\right) \cdot n\right) \cdot \frac{50}{3}\right) \cdot \left(\log n \cdot \left(\log i \cdot \log i\right) + \left(\log n \cdot \log n\right) \cdot \log n\right)\right)\right)\right)}{\frac{i}{n}}\\

\mathbf{elif}\;n \le 2.5555363937413246 \cdot 10^{+221}:\\
\;\;\;\;\frac{\mathsf{fma}\left(50, i \cdot i, \mathsf{fma}\left(\frac{50}{3} \cdot i, i \cdot i, i \cdot 100\right)\right)}{\frac{i}{n}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)} \cdot \sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\frac{i}{n}} \cdot \left(\sqrt[3]{\sqrt[3]{\frac{i}{n}} \cdot \sqrt[3]{\frac{i}{n}}} \cdot \sqrt[3]{\sqrt[3]{\sqrt[3]{\frac{i}{n}}} \cdot \left(\sqrt[3]{\sqrt[3]{\frac{i}{n}}} \cdot \sqrt[3]{\sqrt[3]{\frac{i}{n}}}\right)}\right)} \cdot \frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\frac{i}{n}}}\\

\end{array}
double f(double i, double n) {
        double r2496962 = 100.0;
        double r2496963 = 1.0;
        double r2496964 = i;
        double r2496965 = n;
        double r2496966 = r2496964 / r2496965;
        double r2496967 = r2496963 + r2496966;
        double r2496968 = pow(r2496967, r2496965);
        double r2496969 = r2496968 - r2496963;
        double r2496970 = r2496969 / r2496966;
        double r2496971 = r2496962 * r2496970;
        return r2496971;
}

double f(double i, double n) {
        double r2496972 = n;
        double r2496973 = -6.246516767500982e+112;
        bool r2496974 = r2496972 <= r2496973;
        double r2496975 = 50.0;
        double r2496976 = i;
        double r2496977 = r2496976 * r2496976;
        double r2496978 = 16.666666666666668;
        double r2496979 = r2496978 * r2496976;
        double r2496980 = 100.0;
        double r2496981 = r2496976 * r2496980;
        double r2496982 = fma(r2496979, r2496977, r2496981);
        double r2496983 = fma(r2496975, r2496977, r2496982);
        double r2496984 = r2496976 / r2496972;
        double r2496985 = r2496983 / r2496984;
        double r2496986 = -1.0933259526011947e+64;
        bool r2496987 = r2496972 <= r2496986;
        double r2496988 = 1.0;
        double r2496989 = r2496988 + r2496984;
        double r2496990 = pow(r2496989, r2496972);
        double r2496991 = -100.0;
        double r2496992 = fma(r2496980, r2496990, r2496991);
        double r2496993 = r2496992 / r2496976;
        double r2496994 = r2496993 * r2496972;
        double r2496995 = -0.13295556128930017;
        bool r2496996 = r2496972 <= r2496995;
        double r2496997 = -1.7065727457962e-312;
        bool r2496998 = r2496972 <= r2496997;
        double r2496999 = r2496988 / r2496976;
        double r2497000 = log1p(r2496984);
        double r2497001 = r2496972 * r2497000;
        double r2497002 = exp(r2497001);
        double r2497003 = fma(r2496980, r2497002, r2496991);
        double r2497004 = r2497003 * r2496972;
        double r2497005 = r2496999 * r2497004;
        double r2497006 = 5.811229823508011e-78;
        bool r2497007 = r2496972 <= r2497006;
        double r2497008 = r2496972 * r2496972;
        double r2497009 = r2496975 * r2497008;
        double r2497010 = log(r2496972);
        double r2497011 = r2497010 * r2497010;
        double r2497012 = r2497008 * r2496972;
        double r2497013 = r2497012 * r2496978;
        double r2497014 = log(r2496976);
        double r2497015 = r2497014 * r2497014;
        double r2497016 = r2497014 * r2497015;
        double r2497017 = r2496972 * r2497014;
        double r2497018 = 33.333333333333336;
        double r2497019 = r2497014 * r2497012;
        double r2497020 = r2497011 * r2497019;
        double r2497021 = r2497015 * r2497009;
        double r2497022 = fma(r2496978, r2497020, r2497021);
        double r2497023 = fma(r2497018, r2497020, r2497022);
        double r2497024 = fma(r2497017, r2496980, r2497023);
        double r2497025 = fma(r2497013, r2497016, r2497024);
        double r2497026 = fma(r2497009, r2497011, r2497025);
        double r2497027 = r2497012 * r2497018;
        double r2497028 = r2497010 * r2497015;
        double r2497029 = r2497010 * r2497014;
        double r2497030 = r2496972 * r2496980;
        double r2497031 = r2497030 * r2497010;
        double r2497032 = r2497011 * r2497010;
        double r2497033 = r2497028 + r2497032;
        double r2497034 = r2497013 * r2497033;
        double r2497035 = r2497031 + r2497034;
        double r2497036 = fma(r2497009, r2497029, r2497035);
        double r2497037 = fma(r2497009, r2497029, r2497036);
        double r2497038 = fma(r2497027, r2497028, r2497037);
        double r2497039 = r2497026 - r2497038;
        double r2497040 = r2497039 / r2496984;
        double r2497041 = 2.5555363937413246e+221;
        bool r2497042 = r2496972 <= r2497041;
        double r2497043 = cbrt(r2497003);
        double r2497044 = r2497043 * r2497043;
        double r2497045 = cbrt(r2496984);
        double r2497046 = r2497045 * r2497045;
        double r2497047 = cbrt(r2497046);
        double r2497048 = cbrt(r2497045);
        double r2497049 = r2497048 * r2497048;
        double r2497050 = r2497048 * r2497049;
        double r2497051 = cbrt(r2497050);
        double r2497052 = r2497047 * r2497051;
        double r2497053 = r2497045 * r2497052;
        double r2497054 = r2497044 / r2497053;
        double r2497055 = r2497043 / r2497045;
        double r2497056 = r2497054 * r2497055;
        double r2497057 = r2497042 ? r2496985 : r2497056;
        double r2497058 = r2497007 ? r2497040 : r2497057;
        double r2497059 = r2496998 ? r2497005 : r2497058;
        double r2497060 = r2496996 ? r2496985 : r2497059;
        double r2497061 = r2496987 ? r2496994 : r2497060;
        double r2497062 = r2496974 ? r2496985 : r2497061;
        return r2497062;
}

Error

Bits error versus i

Bits error versus n

Target

Original42.6
Target42.3
Herbie29.6
\[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 5 regimes
  2. if n < -6.246516767500982e+112 or -1.0933259526011947e+64 < n < -0.13295556128930017 or 5.811229823508011e-78 < n < 2.5555363937413246e+221

    1. Initial program 52.3

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

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

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

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

    if -6.246516767500982e+112 < n < -1.0933259526011947e+64

    1. Initial program 35.9

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(100, {\left(1 + \frac{i}{n}\right)}^{n}, -100\right)}{\frac{i}{n}}}\]
    3. Using strategy rm
    4. Applied associate-/r/35.8

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

    if -0.13295556128930017 < n < -1.7065727457962e-312

    1. Initial program 16.5

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(100, {\left(1 + \frac{i}{n}\right)}^{n}, -100\right)}{\frac{i}{n}}}\]
    3. Using strategy rm
    4. Applied add-exp-log16.5

      \[\leadsto \frac{\mathsf{fma}\left(100, {\color{blue}{\left(e^{\log \left(1 + \frac{i}{n}\right)}\right)}}^{n}, -100\right)}{\frac{i}{n}}\]
    5. Applied pow-exp16.5

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

      \[\leadsto \frac{\mathsf{fma}\left(100, e^{\color{blue}{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}}, -100\right)}{\frac{i}{n}}\]
    7. Using strategy rm
    8. Applied div-inv16.5

      \[\leadsto \frac{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}{\color{blue}{i \cdot \frac{1}{n}}}\]
    9. Applied *-un-lft-identity16.5

      \[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{i \cdot \frac{1}{n}}\]
    10. Applied times-frac17.2

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

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

    if -1.7065727457962e-312 < n < 5.811229823508011e-78

    1. Initial program 46.8

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(100, {\left(1 + \frac{i}{n}\right)}^{n}, -100\right)}{\frac{i}{n}}}\]
    3. Using strategy rm
    4. Applied add-exp-log46.8

      \[\leadsto \frac{\mathsf{fma}\left(100, {\color{blue}{\left(e^{\log \left(1 + \frac{i}{n}\right)}\right)}}^{n}, -100\right)}{\frac{i}{n}}\]
    5. Applied pow-exp46.8

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

      \[\leadsto \frac{\mathsf{fma}\left(100, e^{\color{blue}{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}}, -100\right)}{\frac{i}{n}}\]
    7. Taylor expanded around 0 20.9

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

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

    if 2.5555363937413246e+221 < n

    1. Initial program 59.6

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(100, {\left(1 + \frac{i}{n}\right)}^{n}, -100\right)}{\frac{i}{n}}}\]
    3. Using strategy rm
    4. Applied add-exp-log59.6

      \[\leadsto \frac{\mathsf{fma}\left(100, {\color{blue}{\left(e^{\log \left(1 + \frac{i}{n}\right)}\right)}}^{n}, -100\right)}{\frac{i}{n}}\]
    5. Applied pow-exp59.6

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

      \[\leadsto \frac{\mathsf{fma}\left(100, e^{\color{blue}{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}}, -100\right)}{\frac{i}{n}}\]
    7. Using strategy rm
    8. Applied add-cube-cbrt41.8

      \[\leadsto \frac{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}{\color{blue}{\left(\sqrt[3]{\frac{i}{n}} \cdot \sqrt[3]{\frac{i}{n}}\right) \cdot \sqrt[3]{\frac{i}{n}}}}\]
    9. Applied add-cube-cbrt41.7

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)} \cdot \sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}}{\left(\sqrt[3]{\frac{i}{n}} \cdot \sqrt[3]{\frac{i}{n}}\right) \cdot \sqrt[3]{\frac{i}{n}}}\]
    10. Applied times-frac41.7

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)} \cdot \sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\frac{i}{n}} \cdot \sqrt[3]{\frac{i}{n}}} \cdot \frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\frac{i}{n}}}}\]
    11. Using strategy rm
    12. Applied add-cube-cbrt41.8

      \[\leadsto \frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)} \cdot \sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\color{blue}{\left(\sqrt[3]{\frac{i}{n}} \cdot \sqrt[3]{\frac{i}{n}}\right) \cdot \sqrt[3]{\frac{i}{n}}}} \cdot \sqrt[3]{\frac{i}{n}}} \cdot \frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\frac{i}{n}}}\]
    13. Applied cbrt-prod41.8

      \[\leadsto \frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)} \cdot \sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\color{blue}{\left(\sqrt[3]{\sqrt[3]{\frac{i}{n}} \cdot \sqrt[3]{\frac{i}{n}}} \cdot \sqrt[3]{\sqrt[3]{\frac{i}{n}}}\right)} \cdot \sqrt[3]{\frac{i}{n}}} \cdot \frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\frac{i}{n}}}\]
    14. Using strategy rm
    15. Applied add-cube-cbrt41.8

      \[\leadsto \frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)} \cdot \sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\left(\sqrt[3]{\sqrt[3]{\frac{i}{n}} \cdot \sqrt[3]{\frac{i}{n}}} \cdot \sqrt[3]{\color{blue}{\left(\sqrt[3]{\sqrt[3]{\frac{i}{n}}} \cdot \sqrt[3]{\sqrt[3]{\frac{i}{n}}}\right) \cdot \sqrt[3]{\sqrt[3]{\frac{i}{n}}}}}\right) \cdot \sqrt[3]{\frac{i}{n}}} \cdot \frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\frac{i}{n}}}\]
  3. Recombined 5 regimes into one program.
  4. Final simplification29.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \le -6.246516767500982 \cdot 10^{+112}:\\ \;\;\;\;\frac{\mathsf{fma}\left(50, i \cdot i, \mathsf{fma}\left(\frac{50}{3} \cdot i, i \cdot i, i \cdot 100\right)\right)}{\frac{i}{n}}\\ \mathbf{elif}\;n \le -1.0933259526011947 \cdot 10^{+64}:\\ \;\;\;\;\frac{\mathsf{fma}\left(100, {\left(1 + \frac{i}{n}\right)}^{n}, -100\right)}{i} \cdot n\\ \mathbf{elif}\;n \le -0.13295556128930017:\\ \;\;\;\;\frac{\mathsf{fma}\left(50, i \cdot i, \mathsf{fma}\left(\frac{50}{3} \cdot i, i \cdot i, i \cdot 100\right)\right)}{\frac{i}{n}}\\ \mathbf{elif}\;n \le -1.7065727457962 \cdot 10^{-312}:\\ \;\;\;\;\frac{1}{i} \cdot \left(\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right) \cdot n\right)\\ \mathbf{elif}\;n \le 5.811229823508011 \cdot 10^{-78}:\\ \;\;\;\;\frac{\mathsf{fma}\left(50 \cdot \left(n \cdot n\right), \log n \cdot \log n, \mathsf{fma}\left(\left(\left(n \cdot n\right) \cdot n\right) \cdot \frac{50}{3}, \log i \cdot \left(\log i \cdot \log i\right), \mathsf{fma}\left(n \cdot \log i, 100, \mathsf{fma}\left(\frac{100}{3}, \left(\log n \cdot \log n\right) \cdot \left(\log i \cdot \left(\left(n \cdot n\right) \cdot n\right)\right), \mathsf{fma}\left(\frac{50}{3}, \left(\log n \cdot \log n\right) \cdot \left(\log i \cdot \left(\left(n \cdot n\right) \cdot n\right)\right), \left(\log i \cdot \log i\right) \cdot \left(50 \cdot \left(n \cdot n\right)\right)\right)\right)\right)\right)\right) - \mathsf{fma}\left(\left(\left(n \cdot n\right) \cdot n\right) \cdot \frac{100}{3}, \log n \cdot \left(\log i \cdot \log i\right), \mathsf{fma}\left(50 \cdot \left(n \cdot n\right), \log n \cdot \log i, \mathsf{fma}\left(50 \cdot \left(n \cdot n\right), \log n \cdot \log i, \left(n \cdot 100\right) \cdot \log n + \left(\left(\left(n \cdot n\right) \cdot n\right) \cdot \frac{50}{3}\right) \cdot \left(\log n \cdot \left(\log i \cdot \log i\right) + \left(\log n \cdot \log n\right) \cdot \log n\right)\right)\right)\right)}{\frac{i}{n}}\\ \mathbf{elif}\;n \le 2.5555363937413246 \cdot 10^{+221}:\\ \;\;\;\;\frac{\mathsf{fma}\left(50, i \cdot i, \mathsf{fma}\left(\frac{50}{3} \cdot i, i \cdot i, i \cdot 100\right)\right)}{\frac{i}{n}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)} \cdot \sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\frac{i}{n}} \cdot \left(\sqrt[3]{\sqrt[3]{\frac{i}{n}} \cdot \sqrt[3]{\frac{i}{n}}} \cdot \sqrt[3]{\sqrt[3]{\sqrt[3]{\frac{i}{n}}} \cdot \left(\sqrt[3]{\sqrt[3]{\frac{i}{n}}} \cdot \sqrt[3]{\sqrt[3]{\frac{i}{n}}}\right)}\right)} \cdot \frac{\sqrt[3]{\mathsf{fma}\left(100, e^{n \cdot \mathsf{log1p}\left(\frac{i}{n}\right)}, -100\right)}}{\sqrt[3]{\frac{i}{n}}}\\ \end{array}\]

Reproduce

herbie shell --seed 2019153 +o rules:numerics
(FPCore (i n)
  :name "Compound Interest"

  :herbie-target
  (* 100 (/ (- (exp (* n (if (== (+ 1 (/ i n)) 1) (/ i n) (/ (* (/ i n) (log (+ 1 (/ i n)))) (- (+ (/ i n) 1) 1))))) 1) (/ i n)))

  (* 100 (/ (- (pow (+ 1 (/ i n)) n) 1) (/ i n))))