Average Error: 45.5 → 0.2
Time: 19.2s
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}{(\left(\frac{1.0}{i}\right) \cdot -4 + \left(16 \cdot i\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}{(\left(\frac{1.0}{i}\right) \cdot -4 + \left(16 \cdot i\right))_*}
double f(double i) {
        double r3409226 = i;
        double r3409227 = r3409226 * r3409226;
        double r3409228 = r3409227 * r3409227;
        double r3409229 = 2.0;
        double r3409230 = r3409229 * r3409226;
        double r3409231 = r3409230 * r3409230;
        double r3409232 = r3409228 / r3409231;
        double r3409233 = 1.0;
        double r3409234 = r3409231 - r3409233;
        double r3409235 = r3409232 / r3409234;
        return r3409235;
}

double f(double i) {
        double r3409236 = i;
        double r3409237 = 1.0;
        double r3409238 = r3409237 / r3409236;
        double r3409239 = -4.0;
        double r3409240 = 16.0;
        double r3409241 = r3409240 * r3409236;
        double r3409242 = fma(r3409238, r3409239, r3409241);
        double r3409243 = r3409236 / r3409242;
        return r3409243;
}

Error

Bits error versus i

Derivation

  1. Initial program 45.5

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

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

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

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

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

    \[\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}{(\left(\frac{1.0}{i}\right) \cdot -4 + \left(16 \cdot i\right))_*}\right)}}^{1}\]
  10. Final simplification0.2

    \[\leadsto \frac{i}{(\left(\frac{1.0}{i}\right) \cdot -4 + \left(16 \cdot i\right))_*}\]

Reproduce

herbie shell --seed 2019112 +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)))