Average Error: 46.3 → 0.0
Time: 57.4s
Precision: 64
\[i \gt 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.0}\]
\[\begin{array}{l} \mathbf{if}\;i \le 227.07557223901145:\\ \;\;\;\;\frac{i}{\left(4 \cdot \left(i \cdot i\right)\right) \cdot \left(4 \cdot \left(i \cdot i\right)\right) - 1.0 \cdot 1.0} \cdot \left(\left(4 \cdot \left(i \cdot i\right) + 1.0\right) \cdot \frac{i}{4}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{16} + \frac{\frac{0.00390625}{i \cdot i} + 0.015625}{i \cdot i}\\ \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.0}
\begin{array}{l}
\mathbf{if}\;i \le 227.07557223901145:\\
\;\;\;\;\frac{i}{\left(4 \cdot \left(i \cdot i\right)\right) \cdot \left(4 \cdot \left(i \cdot i\right)\right) - 1.0 \cdot 1.0} \cdot \left(\left(4 \cdot \left(i \cdot i\right) + 1.0\right) \cdot \frac{i}{4}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{16} + \frac{\frac{0.00390625}{i \cdot i} + 0.015625}{i \cdot i}\\

\end{array}
double f(double i) {
        double r8175813 = i;
        double r8175814 = r8175813 * r8175813;
        double r8175815 = r8175814 * r8175814;
        double r8175816 = 2.0;
        double r8175817 = r8175816 * r8175813;
        double r8175818 = r8175817 * r8175817;
        double r8175819 = r8175815 / r8175818;
        double r8175820 = 1.0;
        double r8175821 = r8175818 - r8175820;
        double r8175822 = r8175819 / r8175821;
        return r8175822;
}

double f(double i) {
        double r8175823 = i;
        double r8175824 = 227.07557223901145;
        bool r8175825 = r8175823 <= r8175824;
        double r8175826 = 4.0;
        double r8175827 = r8175823 * r8175823;
        double r8175828 = r8175826 * r8175827;
        double r8175829 = r8175828 * r8175828;
        double r8175830 = 1.0;
        double r8175831 = r8175830 * r8175830;
        double r8175832 = r8175829 - r8175831;
        double r8175833 = r8175823 / r8175832;
        double r8175834 = r8175828 + r8175830;
        double r8175835 = r8175823 / r8175826;
        double r8175836 = r8175834 * r8175835;
        double r8175837 = r8175833 * r8175836;
        double r8175838 = 0.0625;
        double r8175839 = 0.00390625;
        double r8175840 = r8175839 / r8175827;
        double r8175841 = 0.015625;
        double r8175842 = r8175840 + r8175841;
        double r8175843 = r8175842 / r8175827;
        double r8175844 = r8175838 + r8175843;
        double r8175845 = r8175825 ? r8175837 : r8175844;
        return r8175845;
}

Error

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

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

    1. Initial program 45.6

      \[\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.0}\]
    2. Simplified0.0

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

      \[\leadsto \color{blue}{\frac{i}{4 \cdot \left(i \cdot i\right) - 1.0} \cdot \frac{i}{4}}\]
    5. Using strategy rm
    6. Applied flip--0.0

      \[\leadsto \frac{i}{\color{blue}{\frac{\left(4 \cdot \left(i \cdot i\right)\right) \cdot \left(4 \cdot \left(i \cdot i\right)\right) - 1.0 \cdot 1.0}{4 \cdot \left(i \cdot i\right) + 1.0}}} \cdot \frac{i}{4}\]
    7. Applied associate-/r/0.0

      \[\leadsto \color{blue}{\left(\frac{i}{\left(4 \cdot \left(i \cdot i\right)\right) \cdot \left(4 \cdot \left(i \cdot i\right)\right) - 1.0 \cdot 1.0} \cdot \left(4 \cdot \left(i \cdot i\right) + 1.0\right)\right)} \cdot \frac{i}{4}\]
    8. Applied associate-*l*0.0

      \[\leadsto \color{blue}{\frac{i}{\left(4 \cdot \left(i \cdot i\right)\right) \cdot \left(4 \cdot \left(i \cdot i\right)\right) - 1.0 \cdot 1.0} \cdot \left(\left(4 \cdot \left(i \cdot i\right) + 1.0\right) \cdot \frac{i}{4}\right)}\]

    if 227.07557223901145 < i

    1. Initial program 47.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.0}\]
    2. Simplified31.3

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

      \[\leadsto \color{blue}{\frac{i}{4 \cdot \left(i \cdot i\right) - 1.0} \cdot \frac{i}{4}}\]
    5. Taylor expanded around inf 0.0

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

      \[\leadsto \color{blue}{\frac{1}{16} + \frac{\frac{0.00390625}{i \cdot i} + 0.015625}{i \cdot i}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \le 227.07557223901145:\\ \;\;\;\;\frac{i}{\left(4 \cdot \left(i \cdot i\right)\right) \cdot \left(4 \cdot \left(i \cdot i\right)\right) - 1.0 \cdot 1.0} \cdot \left(\left(4 \cdot \left(i \cdot i\right) + 1.0\right) \cdot \frac{i}{4}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{16} + \frac{\frac{0.00390625}{i \cdot i} + 0.015625}{i \cdot i}\\ \end{array}\]

Reproduce

herbie shell --seed 2019104 
(FPCore (i)
  :name "Octave 3.8, jcobi/4, as called"
  :pre (and (> i 0))
  (/ (/ (* (* i i) (* i i)) (* (* 2 i) (* 2 i))) (- (* (* 2 i) (* 2 i)) 1.0)))