Average Error: 46.0 → 0.0
Time: 1.6s
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 219.86646907900064:\\ \;\;\;\;\frac{i}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \cdot \frac{i}{2 \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;0.00390625 \cdot \frac{1}{{i}^{4}} + \left(0.015625 \cdot \frac{1}{{i}^{2}} + 0.0625\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 219.86646907900064:\\
\;\;\;\;\frac{i}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \cdot \frac{i}{2 \cdot 2}\\

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

\end{array}
double f(double i) {
        double r80936 = i;
        double r80937 = r80936 * r80936;
        double r80938 = r80937 * r80937;
        double r80939 = 2.0;
        double r80940 = r80939 * r80936;
        double r80941 = r80940 * r80940;
        double r80942 = r80938 / r80941;
        double r80943 = 1.0;
        double r80944 = r80941 - r80943;
        double r80945 = r80942 / r80944;
        return r80945;
}

double f(double i) {
        double r80946 = i;
        double r80947 = 219.86646907900064;
        bool r80948 = r80946 <= r80947;
        double r80949 = 2.0;
        double r80950 = r80949 * r80946;
        double r80951 = r80950 * r80950;
        double r80952 = 1.0;
        double r80953 = r80951 - r80952;
        double r80954 = r80946 / r80953;
        double r80955 = r80949 * r80949;
        double r80956 = r80946 / r80955;
        double r80957 = r80954 * r80956;
        double r80958 = 0.00390625;
        double r80959 = 1.0;
        double r80960 = 4.0;
        double r80961 = pow(r80946, r80960);
        double r80962 = r80959 / r80961;
        double r80963 = r80958 * r80962;
        double r80964 = 0.015625;
        double r80965 = 2.0;
        double r80966 = pow(r80946, r80965);
        double r80967 = r80959 / r80966;
        double r80968 = r80964 * r80967;
        double r80969 = 0.0625;
        double r80970 = r80968 + r80969;
        double r80971 = r80963 + r80970;
        double r80972 = r80948 ? r80957 : r80971;
        return r80972;
}

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

    1. Initial program 44.1

      \[\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 219.86646907900064 < i

    1. Initial program 47.9

      \[\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.1

      \[\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)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.0

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

Reproduce

herbie shell --seed 2020064 
(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)))