Average Error: 46.7 → 0.0
Time: 2.4s
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 204.76020695153215:\\ \;\;\;\;\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 204.76020695153215:\\
\;\;\;\;\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 r60073 = i;
        double r60074 = r60073 * r60073;
        double r60075 = r60074 * r60074;
        double r60076 = 2.0;
        double r60077 = r60076 * r60073;
        double r60078 = r60077 * r60077;
        double r60079 = r60075 / r60078;
        double r60080 = 1.0;
        double r60081 = r60078 - r60080;
        double r60082 = r60079 / r60081;
        return r60082;
}

double f(double i) {
        double r60083 = i;
        double r60084 = 204.76020695153215;
        bool r60085 = r60083 <= r60084;
        double r60086 = 2.0;
        double r60087 = r60086 * r60083;
        double r60088 = r60087 * r60087;
        double r60089 = 1.0;
        double r60090 = r60088 - r60089;
        double r60091 = r60083 / r60090;
        double r60092 = r60086 * r60086;
        double r60093 = r60083 / r60092;
        double r60094 = r60091 * r60093;
        double r60095 = 0.00390625;
        double r60096 = 1.0;
        double r60097 = 4.0;
        double r60098 = pow(r60083, r60097);
        double r60099 = r60096 / r60098;
        double r60100 = 0.015625;
        double r60101 = 2.0;
        double r60102 = pow(r60083, r60101);
        double r60103 = r60096 / r60102;
        double r60104 = 0.0625;
        double r60105 = fma(r60100, r60103, r60104);
        double r60106 = fma(r60095, r60099, r60105);
        double r60107 = r60085 ? r60094 : r60106;
        return r60107;
}

Error

Bits error versus i

Derivation

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

    1. Initial program 45.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 204.76020695153215 < i

    1. Initial program 48.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. Simplified32.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 204.76020695153215:\\ \;\;\;\;\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 2020057 +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)))