Average Error: 45.8 → 0.2
Time: 17.6s
Precision: 64
\[\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 r12184496 = i;
        double r12184497 = r12184496 * r12184496;
        double r12184498 = r12184497 * r12184497;
        double r12184499 = 2.0;
        double r12184500 = r12184499 * r12184496;
        double r12184501 = r12184500 * r12184500;
        double r12184502 = r12184498 / r12184501;
        double r12184503 = 1.0;
        double r12184504 = r12184501 - r12184503;
        double r12184505 = r12184502 / r12184504;
        return r12184505;
}

double f(double i) {
        double r12184506 = i;
        double r12184507 = 1.0;
        double r12184508 = r12184507 / r12184506;
        double r12184509 = -4.0;
        double r12184510 = 16.0;
        double r12184511 = r12184510 * r12184506;
        double r12184512 = fma(r12184508, r12184509, r12184511);
        double r12184513 = r12184506 / r12184512;
        return r12184513;
}

\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))_*}

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.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 2019101 +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)))