Average Error: 45.8 → 0.2
Time: 21.7s
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}\]
\[\frac{i}{\mathsf{fma}\left(\left(\frac{1.0}{i}\right), -4, \left(16 \cdot i\right)\right)}\]
\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}
\frac{i}{\mathsf{fma}\left(\left(\frac{1.0}{i}\right), -4, \left(16 \cdot i\right)\right)}
double f(double i) {
        double r11975580 = i;
        double r11975581 = r11975580 * r11975580;
        double r11975582 = r11975581 * r11975581;
        double r11975583 = 2.0;
        double r11975584 = r11975583 * r11975580;
        double r11975585 = r11975584 * r11975584;
        double r11975586 = r11975582 / r11975585;
        double r11975587 = 1.0;
        double r11975588 = r11975585 - r11975587;
        double r11975589 = r11975586 / r11975588;
        return r11975589;
}

double f(double i) {
        double r11975590 = i;
        double r11975591 = 1.0;
        double r11975592 = r11975591 / r11975590;
        double r11975593 = -4.0;
        double r11975594 = 16.0;
        double r11975595 = r11975594 * r11975590;
        double r11975596 = fma(r11975592, r11975593, r11975595);
        double r11975597 = r11975590 / r11975596;
        return r11975597;
}

Error

Bits error versus i

Derivation

  1. Initial program 45.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.0}\]
  2. Simplified15.1

    \[\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-frac15.2

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

    \[\leadsto \frac{i}{4 \cdot \left(i \cdot i\right) - 1.0} \cdot \color{blue}{{\left(\frac{i}{4}\right)}^{1}}\]
  7. Applied pow115.2

    \[\leadsto \color{blue}{{\left(\frac{i}{4 \cdot \left(i \cdot i\right) - 1.0}\right)}^{1}} \cdot {\left(\frac{i}{4}\right)}^{1}\]
  8. Applied pow-prod-down15.2

    \[\leadsto \color{blue}{{\left(\frac{i}{4 \cdot \left(i \cdot i\right) - 1.0} \cdot \frac{i}{4}\right)}^{1}}\]
  9. Simplified0.2

    \[\leadsto {\color{blue}{\left(\frac{i}{\mathsf{fma}\left(\left(\frac{1.0}{i}\right), -4, \left(16 \cdot i\right)\right)}\right)}}^{1}\]
  10. Final simplification0.2

    \[\leadsto \frac{i}{\mathsf{fma}\left(\left(\frac{1.0}{i}\right), -4, \left(16 \cdot i\right)\right)}\]

Reproduce

herbie shell --seed 2019124 +o rules:numerics
(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)))