Average Error: 47.1 → 0.0
Time: 1.8s
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 200.9309000121655515158636262640357017517:\\ \;\;\;\;\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 200.9309000121655515158636262640357017517:\\
\;\;\;\;\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 r96126 = i;
        double r96127 = r96126 * r96126;
        double r96128 = r96127 * r96127;
        double r96129 = 2.0;
        double r96130 = r96129 * r96126;
        double r96131 = r96130 * r96130;
        double r96132 = r96128 / r96131;
        double r96133 = 1.0;
        double r96134 = r96131 - r96133;
        double r96135 = r96132 / r96134;
        return r96135;
}

double f(double i) {
        double r96136 = i;
        double r96137 = 200.93090001216555;
        bool r96138 = r96136 <= r96137;
        double r96139 = 2.0;
        double r96140 = r96139 * r96136;
        double r96141 = r96140 * r96140;
        double r96142 = 1.0;
        double r96143 = r96141 - r96142;
        double r96144 = r96136 / r96143;
        double r96145 = r96139 * r96139;
        double r96146 = r96136 / r96145;
        double r96147 = r96144 * r96146;
        double r96148 = 0.00390625;
        double r96149 = 1.0;
        double r96150 = 4.0;
        double r96151 = pow(r96136, r96150);
        double r96152 = r96149 / r96151;
        double r96153 = 0.015625;
        double r96154 = 2.0;
        double r96155 = pow(r96136, r96154);
        double r96156 = r96149 / r96155;
        double r96157 = 0.0625;
        double r96158 = fma(r96153, r96156, r96157);
        double r96159 = fma(r96148, r96152, r96158);
        double r96160 = r96138 ? r96147 : r96159;
        return r96160;
}

Error

Bits error versus i

Derivation

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

    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 200.93090001216555 < i

    1. Initial program 48.8

      \[\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. Simplified33.4

      \[\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 200.9309000121655515158636262640357017517:\\ \;\;\;\;\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 2019353 +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)))