Average Error: 46.6 → 0.0
Time: 1.9s
Precision: 64
\[i \gt 0.0\]
\[\frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1}\]
\[\begin{array}{l} \mathbf{if}\;i \le 208.3152890205100220555323176085948944092:\\ \;\;\;\;\frac{i}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \cdot \frac{i}{2 \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.00390625, \frac{1}{{i}^{4}}, \mathsf{fma}\left(0.015625, \frac{1}{{i}^{2}}, 0.0625\right)\right)\\ \end{array}\]
\frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1}
\begin{array}{l}
\mathbf{if}\;i \le 208.3152890205100220555323176085948944092:\\
\;\;\;\;\frac{i}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \cdot \frac{i}{2 \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.00390625, \frac{1}{{i}^{4}}, \mathsf{fma}\left(0.015625, \frac{1}{{i}^{2}}, 0.0625\right)\right)\\

\end{array}
double f(double i) {
        double r52925 = i;
        double r52926 = r52925 * r52925;
        double r52927 = r52926 * r52926;
        double r52928 = 2.0;
        double r52929 = r52928 * r52925;
        double r52930 = r52929 * r52929;
        double r52931 = r52927 / r52930;
        double r52932 = 1.0;
        double r52933 = r52930 - r52932;
        double r52934 = r52931 / r52933;
        return r52934;
}

double f(double i) {
        double r52935 = i;
        double r52936 = 208.31528902051002;
        bool r52937 = r52935 <= r52936;
        double r52938 = 2.0;
        double r52939 = r52938 * r52935;
        double r52940 = r52939 * r52939;
        double r52941 = 1.0;
        double r52942 = r52940 - r52941;
        double r52943 = r52935 / r52942;
        double r52944 = r52938 * r52938;
        double r52945 = r52935 / r52944;
        double r52946 = r52943 * r52945;
        double r52947 = 0.00390625;
        double r52948 = 1.0;
        double r52949 = 4.0;
        double r52950 = pow(r52935, r52949);
        double r52951 = r52948 / r52950;
        double r52952 = 0.015625;
        double r52953 = 2.0;
        double r52954 = pow(r52935, r52953);
        double r52955 = r52948 / r52954;
        double r52956 = 0.0625;
        double r52957 = fma(r52952, r52955, r52956);
        double r52958 = fma(r52947, r52951, r52957);
        double r52959 = r52937 ? r52946 : r52958;
        return r52959;
}

Error

Bits error versus i

Derivation

  1. Split input into 2 regimes
  2. if i < 208.31528902051002

    1. Initial program 45.3

      \[\frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1}\]
    2. Simplified0.0

      \[\leadsto \color{blue}{\frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right) \cdot \left(2 \cdot 2\right)}}\]
    3. Using strategy rm
    4. Applied times-frac0.0

      \[\leadsto \color{blue}{\frac{i}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \cdot \frac{i}{2 \cdot 2}}\]

    if 208.31528902051002 < i

    1. Initial program 48.0

      \[\frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1}\]
    2. Simplified31.7

      \[\leadsto \color{blue}{\frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right) \cdot \left(2 \cdot 2\right)}}\]
    3. Taylor expanded around inf 0.0

      \[\leadsto \color{blue}{0.00390625 \cdot \frac{1}{{i}^{4}} + \left(0.015625 \cdot \frac{1}{{i}^{2}} + 0.0625\right)}\]
    4. Simplified0.0

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.00390625, \frac{1}{{i}^{4}}, \mathsf{fma}\left(0.015625, \frac{1}{{i}^{2}}, 0.0625\right)\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \le 208.3152890205100220555323176085948944092:\\ \;\;\;\;\frac{i}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \cdot \frac{i}{2 \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.00390625, \frac{1}{{i}^{4}}, \mathsf{fma}\left(0.015625, \frac{1}{{i}^{2}}, 0.0625\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019344 +o rules:numerics
(FPCore (i)
  :name "Octave 3.8, jcobi/4, as called"
  :precision binary64
  :pre (and (> i 0.0))
  (/ (/ (* (* i i) (* i i)) (* (* 2 i) (* 2 i))) (- (* (* 2 i) (* 2 i)) 1)))